如题,请各位帮忙!

解决方案 »

  1.   

    dim ctrl_press as booleanPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 17 Then ctrl_press = True
    End SubPrivate Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 10 And ctrl_press Then MsgBox "you press ctrl+enter"
    End SubPrivate Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 17 Then ctrl_press = False
    End Sub
      

  2.   

    KeyAscii = 10 不是 13
      

  3.   

    Option Explicit
    Dim ctrl_press As BooleanPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 17 Then ctrl_press = True
    End SubPrivate Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = 10 And ctrl_press Then
        KeyAscii = False
        ctrl_press = False
    End If
    End SubPrivate Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 17 Then ctrl_press = False
    End Sub
      

  4.   

    这样不好啊,如果我按紧Ctrl或者Enter它照样没屏蔽。
      

  5.   

    用HOOK吧,窗口有焦点用上面代码才行
      

  6.   

    怎样屏蔽Ctrl+Enter键 
    ---------
    最简单但又绝对行之有效的方法:把键盘上的CTRL和ENTER抠掉
    呵呵