Private Sub form_keyDown(KeyAscii As Integer, shift As Integer) If KeyAscii = 13 Then
MsgBox "hah"
End IfEnd SubPrivate Sub Form_Load()
Me.KeyPreview = True
End Sub
为什么把"13" 换成 "59" 就不能用了???
MsgBox "hah"
End IfEnd SubPrivate Sub Form_Load()
Me.KeyPreview = True
End Sub
为什么把"13" 换成 "59" 就不能用了???
If KeyAscii = 59 Then
MsgBox "hah"
End If
End Sub
也不行啊!!在KeyPress事件里写,你试过没有:Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 59 Then
MsgBox "hah"
End If
End Sub
我买了一个磁卡读卡器
是键盘借口的
用银行卡一刷,出现下面一行的东西
;955592xxxxxxxx=06xxxxxxx3?我要根据";"来触发我的键盘捕获程序
然后跟数据库对比各位有没什么好的思路??提供代码是最好拉
要不换成Form_KeyDown或Form_KeyUp事件试试
我查了,还有人用一个text来存刷进的植
59应该事指F5那个键~
我的系统是WIN2003不知道系统对这个有没有影响
MsgBox "hah"
End IfEnd Sub
这样不会错了吧!??
注意了吗 1个是KEYCODE 1个是KEYPRESS
但是 在 其中任何1个时间中都可以引用Keycode值
Print KeyCode
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Print KeyAscii
End SuB
试试这个就知道了
MsgBox "hah"
End IfEnd SubPrivate Sub Form_Load()
Me.KeyPreview = True
End Sub
哈
Private Sub form_keyDown(KeyAscii As Integer, shift As Integer) If KeyAscii = Asc(";") Then
MsgBox "hah"
End IfEnd SubPrivate Sub Form_Load()
Me.KeyPreview = True
End Sub没用!
Private Sub form_keyDown(KeyAscii As Integer, shift As Integer)msgbox keyasciiEnd Sub
知道后再做判斷!
MsgBox "hah"
End IfEnd Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 59 Then
MsgBox "hah"
End If
End SubPrivate Sub Form_Load()
Me.KeyPreview = True
End Sub
就可以了!