问题描述
试图弄清楚是否可以禁用键盘上的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:
私人
Sub Form2_KeyDown( ByVal 发送者 如 对象 , ByVal e 如 System.Windows. KeyEventArgs ) 句柄 MyBase .KeyDown 跨度>
SubForm2_KeyDown(ByValsenderAsObject,ByValeAsSystem.Windows.Forms.KeyEventArgs)HandlesMyBase.KeyDown
如果 e.KeyCode = 键 .F4 和 e.Modifiers = 键 .Alt 然后
Ife.KeyCode =Keys.F4Ande.Modifiers =Keys.AltThen
&n.Handled =
真
MsgBox( 请选择一个有效选项" , MsgBoxStyle .Critical)
MsgBox("Pleasse select a valid option",MsgBoxStyle.Critical)
结束IF
End IF
N.A.Malik
N.A.Malik
推荐答案
您可以将光标悬停在每个控件上,然后会出现一个工具提示,说明它们的用途.
You can hover your cursor over each one of those controls and a tooltip will appear explaining what they are for.
这篇关于键盘快捷键,多种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!