1.vb ����Դ��
vb ����Դ��
提供两种方法:
1、键盘s键Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 9 The源码接力双阳源码n Text1.Text = abcdefg Tab键的Ascii码=9
End Sub
2、利用API函数:
使用GetAsyncKeyState函数可以获得键盘的盘代源码包实战动作。
GetAsyncKeyState函数根据虚拟键表判断按键的键盘s键试看观看源码类型,返回值为一个位的源码波浪点源码二进制数,如果被按下则最高位为1,盘代51社团源码即返回-
Private Declare Function GetAsyncKeyState Lib user (ByVal vKey As Long) As Integer
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyResult = GetAsyncKeyState(9)
If KeyResult = - The键盘s键n Text1.Text = abcdefg
End Sub