PrintPreview中的ctrl + p快捷键 [英] ctrl+p shortcut key in PrintPreview

查看:115
本文介绍了PrintPreview中的ctrl + p快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为PrttPreview控制表单中的按钮Print添加快捷方式(ctrl + p)?

How to add a shortcut (ctrl+p) for the button Print in the PrttPreview Control form?

推荐答案

通过这些链接,您可能会有所了解。 ..

http://stackoverflow.com/questions/20897823/how-to-show-print-dialogue-when-i-press-control-p-in-windows-form [ ^ ]





http://stackoverflow.com/questions/7650915/capturing-ctrl-shift-p-key-stroke-in-ac -sharp-windows-forms-application [ ^ ]
go through these links you may get some idea...
http://stackoverflow.com/questions/20897823/how-to-show-print-dialogue-when-i-press-control-p-in-windows-form[^]


http://stackoverflow.com/questions/7650915/capturing-ctrl-shift-p-key-stroke-in-a-c-sharp-windows-forms-application[^]


http://www.c-sharpcorner.com/uploadfile/mahesh/printpreviewcontrol-in-C-Sharp/ [ ^ ]



https://documentation.devexpress.com/#xtrareports/CustomDocument2668 [ ^ ]

http://www.dotnetheaven.com/article/printpreview-control-in-vb.net [ ^ ]

打印预览控制栏 [ ^ ]
http://www.c-sharpcorner.com/uploadfile/mahesh/printpreviewcontrol-in-C-Sharp/[^]

https://documentation.devexpress.com/#xtrareports/CustomDocument2668[^]
http://www.dotnetheaven.com/article/printpreview-control-in-vb.net[^]
Print Preview Control Bar[^]


拖放PrintDailoG并设置PropartyAllowCurrentPage = True



和Cs之后的文件代码:





Drag An Drop "PrintDailoG" And Set Proparty "AllowCurrentPage = True"

And After Cs File Code:


protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
       {
           
           if ((Keys.Control | Keys.P) == keyData)
           {
               PrintForm.ShowDialog(this);
           }


           return base.ProcessCmdKey(ref msg, keyData);
       }


这篇关于PrintPreview中的ctrl + p快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆