键盘快捷键,多种形式 [英] Keyboard shortcuts , multiple forms
问题描述
试图弄清楚是否可以禁用键盘上的Windows键(仅在应用程序加载时才永久禁用),但仍找不到方法,可以吗?
Trying to figure out if we can disable Windows key on keyboard (ONLY when application loads, not permanently), but couldn't found a way yet, is it possible?
其次,禁用ALT + F4,它在Form1上工作正常,但在Form2上不工作.这是我所拥有的:
Secondly, was disabling ALT+F4, it worked fine on Form1, but didn't worked on form2. Here is what I have:
私人
Form2_KeyDown( ByVal 发送者
SubForm2_KeyDown(ByValsender AsObject, ByVale AsSystem.Windows.Forms.KeyEventArgs) HandlesMyBase.KeyDown
Ife.KeyCode = Keys.F4 Ande.Modifiers = Keys.Alt Then
&n.Handled =
MsgBox( 请选择一个有效选项" ,
MsgBox("Pleasse select a valid option", MsgBoxStyle.Critical)
结束IF
End IF
N.A.Malik
N.A.Malik
推荐答案
在编辑将代码插入其中的帖子时,请尝试在窗口顶部的工具栏中使用插入代码块功能.它会清晰显示.是否.
Try using the insert code block function in the toolstrip at the tope of the window when editing a post for inserting code into so that it is displayed legibly. Or not.
您可以将光标悬停在每个控件上,然后会出现一个工具提示,说明它们的用途.
You can hover your cursor over each one of those controls and a tooltip will appear explaining what they are for.
这篇关于键盘快捷键,多种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!