开发者

How to open forms ussing keyboard keys

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜