Home > Software engineering >  VB to do a virtual keyboard
VB to do a virtual keyboard

Time:09-25

I've been using VB to do on a PC serial communication, the idea is that by single chip microcomputer, sending data to simulate the keyboard operation, that is, such as a serial port receives the "f" is, it is to press the f key on the keyboard, input method is showed on the "fu", "hair", "not" the word, and then when receive the "a" character, input method shown in the "send", "method", "punishment" these Chinese characters, so I can play in the VB text box I wanted to say a word, or even a paragraph, do not know to have know what I mean, in short, is the character by receiving MCU to a serial port (asiic value), to simulate the corresponding buttons to press the keyboard, so as to realize the function of a virtual keyboard, but I don't know, don't know what kind of method is feasible or not feasible, hope to recognize in the BBS can give me some advice, thank you! Very worry,

CodePudding user response:

Have a user control, you can download, this seems to be a virtual keyboard, you can switch input method, if you can't download, contact me,
http://download.csdn.net/detail/dongfangbai/2035301

CodePudding user response:

'statement
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)


Call keybd_event (KeyAscII, 0, 0) 'simulation to press the button
Call keybd_event (KeyAscII, 0, 0) 'simulation open keys

'KeyAscII is receives the AscII, 2 times the mock press, let go of AscII code corresponding to the key,
  • Related