Home > Software engineering >  Vb (6.0) how to send other window (other) string
Vb (6.0) how to send other window (other) string

Time:09-24

My demand is that
I [project. Exe] there are many buttons, each button represents a string is not the same,
This program is permanently placed at the top of a small window at the bottom right
Click on the button on a window (may be ie a text box, also may be the word), such as the cursor location to send the specified string,

CodePudding user response:

In the MSDN search "SendInput"

CodePudding user response:

Can use sendkeys after get focus, this is a function of the vb built-in
If the mouse in the text box, then let the mouse to click, can use the API function sendmessage send left-click the mouse events

CodePudding user response:

"Click on the button on a window (may be a text box of ie may also be a word), such as the cursor location to send the specified string,"
Estimated need API function to the program (ie or word), ie to VB detected the text frame's handle, the file name or IP address, or word file handle, file name, file path, with the handle, file name, address, path, VB just know where to send data, and then you can send data,
Do a simulation before an exe to send data to another exe program, use the multiple API function, can't remember what is the function, using the API function for handle, path and file name, etc., and then send the data,

CodePudding user response:

It is recommended to use spy4win software,

CodePudding user response:

Send way have API function operation handle setting values, and by simulating the keyboard sends a string, see which convenience with which the building Lord, suggested that the problem of the concrete, such as operating procedures, the assignment of the object is a button or text box or a volume label, text box is read-only, whether can have the focus, you are so broad as ie, what word will only increase the time to solve the problem, and the result also can not solve, please clearly identify specific problem
  • Related