c1PrintPreviewDialog

Posted by: softkmg on 11 March 2019, 5:17 pm EST

    • Post Options:
    • Link

    Posted 11 March 2019, 5:17 pm EST

    Respected Sir/ Madam

    i am facing a problem with c1PrintPreviewDialog Control

    we want to add short-Cut Key Like Ctrl-P for print instead of Click on Print Icon or Alt+P

    how to resolve this problem .

    i am working in All Working through Code not drag and drop the control

    Please share the example.

  • Posted 12 March 2019, 6:12 pm EST

    Hello,

    You can achieve the requirement by setting the KeyPreview property of the form to True and then setting the shortcut in its KeyDown event as follows:

    private void Form1_KeyDown(object sender, KeyEventArgs e)
         {
             if(e.Control)
             {
                 if (e.KeyCode ==Keys.P)
                 {
                     c1Report1.Print(); 
                 }
             }
         }
    

    This has been implemented in the attached application for your reference.

    Best Regards,

    Esha

    C1ReportByCode_PrintShortcut.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels