简体   繁体   中英

How to open forms ussing keyboard keys

我希望能够使用VB.net按shift + D + A + L打开另一个表格(form2),我该怎么做?

Set the forms KeyPreview property to true, then add code to the forms KeyDown event. Y Then use an if statement eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM