Home > Net >  Consultation under vb.net how to obtain the value of the text box, then sent to another program (ana
Consultation under vb.net how to obtain the value of the text box, then sent to another program (ana

Time:11-17


As shown in figure is such a program,
Hope after text box input the content, click the button below, after next to another program, such as notepad using the mouse to activate, can put the text box content input by means of simulation type (some web page banned paste, want to pass this method implementation)

CodePudding user response:

The news of the WINDOWS function. VB has a SENDKEY.

CodePudding user response:

reference 1st floor HuaYunZhi's response:
WINDOWS message function. VB has a SENDKEY.

Can be used for a sample

CodePudding user response:

You another program if you have any source, also is the development or oneself write a communication interface,
If not, give you an idea of using SPY++ check window handle, layers of looking for

Find the corresponding place
//IntPtr hWnd=FindWindow (null, "Save a Copy... ");
//IntPtr hWnd1=FindWindowEx (hWnd, IntPtr. Zero, "DUIViewWndClassName", null);
//IntPtr hWnd2=FindWindowEx (hWnd1, IntPtr. Zero, "DirectUIHWND", null);
Then using SendMessage text
SendMessage (hWnd2 WM_SETTEXT, IntPtr. Zero, "your string");
  • Related