我如何调用esc key dynamicaly(VB.NET Win表单) [英] How do i call esc key dynamicaly(VB.NET Win forms)
本文介绍了我如何调用esc key dynamicaly(VB.NET Win表单)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有。
i想要提升Esc键(keybord)事件,无需按下Esc按钮。
问候
Rajeesh MP
解决方案
您好,您可以使用枚举Keys并使用值Escape来提升转义键行动。
这将适用于C#和VB.NET windows窗体。
快乐编码......! :-D
在您的表单属性中选择cancelbutton来调用任何按钮来关闭表单
例如:
form1
按钮名称:退出
在退出按钮事件中写me.close
现在在表单属性cancelbutton中调用退出按钮。
使用SendKeys发送键盘和按键组合到活动应用程序。此类无法实例化。要将键击发送到类并立即继续执行程序流程,请使用发送。要等待按键启动的任何进程,请使用SendWait。
System.Windows.Forms.SendKeys.Send( A);
System.Windows.Forms.SendKeys.Send( {ENTER});
Dear All.
i want to raise Esc key(keybord) Event, without pressing the Esc button.
Regards
Rajeesh MP
解决方案
Hi,
You can use the enum "Keys" and use the value "Escape" to do raise an escape key action.
This will work in both C# & VB.NET windows forms.
Happy coding...! :-D
in your form properties choose cancelbutton to call any button to close the form
For eg:
form1
Button name : Quit
in quit button event write me.close
now call the quit button in your form properties cancelbutton.
Use SendKeys to send keystrokes and keystroke combinations to the active application. This class cannot be instantiated. To send a keystroke to a class and immediately continue with the flow of your program, use Send. To wait for any processes started by the keystroke, use SendWait.
System.Windows.Forms.SendKeys.Send("A"); System.Windows.Forms.SendKeys.Send("{ENTER}");
这篇关于我如何调用esc key dynamicaly(VB.NET Win表单)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文