开发者

How to open forms ussing keyboard keys

开发者 https://www.devze.com 2023-02-26 14:23 出处:网络
I would like to be able to press shift+D+A+L to open another form (form2) ussing VB.net how do i do开发者_如何学Python this?Set the forms KeyPreview property to true, then add code to the forms KeyDow

I would like to be able to press shift+D+A+L to open another form (form2) ussing VB.net how do i do开发者_如何学Python this?


Set the forms KeyPreview property to true, then add code to the forms KeyDown event. Y Then use an if statement e.g If e.KeyCode = Keys.F1 Then

Add each key you want as a condition and since you want to use shift add this to your if; e.modifier = keys.shift

Then create a new instance of the second form and call the showdialog function.

0

精彩评论

暂无评论...
验证码 换一张
取 消