C# 如何在按下control+;时显示打印对话框;windows窗体中的P

C# 如何在按下control+;时显示打印对话框;windows窗体中的P,c#,C#,如何在windows窗体中按control+p时显示打印对话框。 我已经有了report1.rdlc和reportviewer1。第二种形式。如何以主格式(第一种格式)打印此报告?这可能有助于: 在表单中添加打印对话框 2.将其属性设置为您的文档 主装货区的第一个 这样做 然后在事件按下键时编写代码 If e.Control AndAlso e.KeyValue = Keys.P Then //somthing End If 这可能会有帮助-嗨,兄弟,我是如何将Prin

如何在windows窗体中按control+p时显示打印对话框。 我已经有了report1.rdlc和reportviewer1。第二种形式。如何以主格式(第一种格式)打印此报告?

这可能有助于:

  • 在表单中添加打印对话框

    2.将其属性设置为您的文档

  • 主装货区的第一个 这样做

    然后在事件按下键时编写代码

     If e.Control AndAlso e.KeyValue = Keys.P Then
        //somthing
    
         End If
    

    这可能会有帮助-嗨,兄弟,我是如何将PrintDialog的属性设置为Report.rdlc的
    Private Sub main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
           Me.KeyPreview = True
        
        End Sub
    
     If e.Control AndAlso e.KeyValue = Keys.P Then
        //somthing
    
         End If