Home > Software engineering > VB how to realize the automatic fill out (in the third party software text box to fill in)
VB how to realize the automatic fill out (in the third party software text box to fill in)
Time:11-30
Write B program, how to implement the following functions? 1. Click on the "complete", the "application B" ABCD the contents of the text box, automatically fill in to "A software" ABCD text box, corresponding, 2. Click on "remove", "A software" ABCD text box capacity,
Each great god! The younger brother, online waiting for...
CodePudding user response:
The simplest, sendkeys function was used to simulate keyboard to keyboard input to the activated form, if you want to simulate the mouse operation, you need to obtain specific to operate with Windows API to send the coordinates of the mouse operation messages, To gm, is called a series of windowsAPI, first find the need to manipulate the window handle, and then in this form to find the specific input box handle, finally sends a message to the input box to adjust the content,
Suggest try the sendkeys can solve your problem,
https://www.cnblogs.com/demonxian3/p/6263948.html
CodePudding user response:
To obtain input box handle should be the most simple
CodePudding user response:
It is recommended to use software Spy4Win
CodePudding user response:
It is recommended to use clswindow, easy to use, specifically to handle such problems
CodePudding user response:
A kind of method is: use the API to find A handle to the window, and then obtain the text frame's handle, and then you can operate A window in the program of B text box, and A kind of method is: through the vb form Linktopic and LinkMode attribute to connect two forms, then the window is A window to receive B's instructions, do the related operations, about Linktopic and LinkMode connection form method is simple, is also called the DDE communication, you check on the Internet, is the equivalent of two forms of pipeline, true not line, I'll give you do, for example,