Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 快捷键在窗体中工作不正常_Vb.net - Fatal编程技术网

Vb.net 快捷键在窗体中工作不正常

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

使用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+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