在vb6
我想能够当用户按下空格键和而不是把在空间使用下划线符号来检测。这是一种可能性还是我只是充满希望?我似乎还不太清楚如何做到这一点,我尝试摆弄按键方法,但是我不知道执行此操作的正确代码。
Private Sub txtbarcode_KeyPress(KeyAscii As Integer)
if keyascii = vbkeyspace then
'replace space with underscore
end if
end sub
这应该工作
Private Sub txtbarcode_KeyPress(KeyAscii As Integer)
If KeyAscii = 32 Then
'replace space with underscore
KeyAscii = 95
End If
End Sub
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句