Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 43 Then KeyAscii = 44 End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 43 Then KeyAscii = 43 + 1 End If End Sub
你的意思是截获用户的按键动作,替换成逗号吧? 用一个全局钩子,截获按键,发现是 + 就发送逗号键 对不起只是个设想,本人 api 不好,实现不了
就ascii就可以实现了, 替换
子类化Public Declare Function SetWindowsHook Lib "user32" Alias "SetWindowsHookA" (ByVal nFilterType As Long, ByVal pfnFilterProc As Long) As LongnFilterType: Const WH_KEYBOARD = 2 pfnFilterProc: AddressOf MyHook...
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 43 Then KeyAscii = 44 End Sub
If KeyAscii = 43 Then KeyAscii = 44
End Sub
If KeyAscii = 43 Then
KeyAscii = 43 + 1
End If
End Sub
用一个全局钩子,截获按键,发现是 + 就发送逗号键
对不起只是个设想,本人 api 不好,实现不了
替换
pfnFilterProc: AddressOf MyHook...
If KeyAscii = 43 Then KeyAscii = 44
End Sub