Vb.net 快捷键在窗体中工作不正常
使用VB.Net(Windows应用程序) 在表单、文本框、组合框等中Vb.net 快捷键在窗体中工作不正常,vb.net,Vb.net,使用VB.Net(Windows应用程序) 在表单、文本框、组合框等中 -> When i open the windows form, if i press ctrl + Enter, then pop windows is opening -> if i enter any data's in the text box, then i press ctrl + Enter, then pop windows is not opening 代码 加载表单时,ctrl
-> When i open the windows form, if i press ctrl + Enter, then pop windows is opening
-> if i enter any data's in the text box, then i press ctrl + Enter, then pop windows is not opening
代码
加载表单时,ctrl+Enter快捷键起作用,一旦我输入或选择表单中的任何数据,则ctrl+Enter快捷键不起作用(不显示弹出窗口)
我的代码有什么问题。如何解决这个问题
需要Vb.net代码帮助设置
Form.KeyPreview=True
并使用修饰符
标志
Private Sub form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.Modifiers = Keys.Control And e.KeyCode = Keys.Enter Then
frmList.sFormID = 51
frmList.Show()
End If
End Sub
Private Sub form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.Modifiers = Keys.Control And e.KeyCode = Keys.Enter Then
frmList.sFormID = 51
frmList.Show()
End If
End Sub