Home > Software engineering >  VB call native input method
VB call native input method

Time:09-21

I've been using VB to do on a PC serial port communication, thoughts are sending data through the single-chip microcomputer and can call out the input method (for example sogou), then use data from the simulation of 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, also don't know whether to use API and how to use the API, hope the recognize in the BBS can give me some advice, thank you!

CodePudding user response:

In the MSDN search SendInput?

CodePudding user response:

reference 1st floor zhao4zhong1 response:
search in the MSDN SendInput?

Can say more specifically?

CodePudding user response:

Does the attention of this post is not high enough?

CodePudding user response:

Check the MSDN is one of the Windows programmer must master the skills,

CodePudding user response:

reference 4 floor zhao4zhong1 response:
check the MSDN is one of the Windows programmer must master the skills,

Sorry teacher, I'll find the information in these days, still have no idea ~

CodePudding user response:

Platform Builder for Microsoft Windows CE 5.0

SendInputSee braking
Configured keybd_event | mouse_event | PostKeybdMessage | | the rid_device_info_keyboard Functions provides

Requirements
OS Versions: Windows CE 2.0 and later.
Header: Winuser.
h.The Link Library: Wmgr_c lib, Uibase. Lib.
This function synthesizes keystrokes, stylus and mouse motions, and the button on.

UINT SendInput (
UINT nInputs,
LPINPUT pInputs,
Int cbSize
);
The Parameters
NInputs
Specifies how many structures pInputs points to.
PInputs
Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the the rid_device_info_keyboard or mouse INPUT stream.
CbSize
Specifies the size of an INPUT structure. If cbSize is not the size of an INPUT structure, the function will fail.
The Return Values
The number of events that The function inserted into The The rid_device_info_keyboard or mouse input stream are success. To get extended error information, call GetLastError.

Few
Windows CE does not support the INPUT_HARDWARE value in the type field of the INPUT structure referred to by the pInputs parameter.

The SendInput function inserts The events in The INPUT structures serially into The The rid_device_info_keyboard or mouse INPUT stream. These events are not interspersed with other The rid_device_info_keyboard or mouse INPUT events inserted either by The user (with The The rid_device_info_keyboard or mouse) or by calls to keybd_event, mouse_event, or other calls to SendInput.

Requirements
OS Versions: Windows CE 2.0 and later.
Header: Winuser.
h.The Link Library: Wmgr_c lib, Uibase. Lib.

See Also
Configured keybd_event | mouse_event | PostKeybdMessage | | the rid_device_info_keyboard Functions provides




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

The Last updated on Wednesday, September 14, 2005,

? 2005 Microsoft Corporation. All rights reserved.

CodePudding user response:

https://www.baidu.com/s? ie=utf-8& F=3 & amp; Rsv_bp=0 & amp; Rsv_idx=1 & amp; Tn=baidu& Wd=SendInput& Rsv_pq=c9d9d58b00028827 & amp; Rsv_t=f24ebgOiVKGn0quHzUpHL8C37pdCpmpqpioDgdaOJZ6Rs3cI % 2 f3o % 2 fnazf66s & amp; Rsv_enter=0 & amp; Rsv_sug3=9 & amp; Rsv_sug1=6 & amp; Rsv_sug7=100 & amp; Prefixsug=SendInput& RSP=0 & amp; InputT=4400 & amp; Rsv_sug4=4401

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:

refer to the eighth floor u013249970 response:
there is a user control, you can download, this seems to be a virtual keyboard, you can switch input method, if you cannot download, contact with me,
http://download.csdn.net/detail/dongfangbai/2035301

I, but can't open, also don't know what file format

CodePudding user response:

User controls, haven't generate OCX format, don't you will it generate controls format?

CodePudding user response:

refer to 6th floor zhao4zhong1 response:
Platform Builder for Microsoft Windows CE 5.0

SendInputSee braking
Configured keybd_event | mouse_event | PostKeybdMessage | | the rid_device_info_keyboard Functions provides

Requirements
OS Versions: Windows CE 2.0 and later.
Header: Winuser.
h.The Link Library: Wmgr_c lib, Uibase. Lib.
This function synthesizes keystrokes, stylus and mouse motions, and the button on.

UINT SendInput (
UINT nInputs,
LPINPUT pInputs,
Int cbSize
);
The Parameters
NInputs
Specifies how many structures pInputs points to.
PInputs
Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the the rid_device_info_keyboard or mouse INPUT stream.
CbSize
Specifies the size of an INPUT structure. If cbSize is not the size of an INPUT structure, the function will fail.
The Return Values
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • API
  • Related