Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find text from another window

Status
Not open for further replies.

Serban

Programmer
Sep 25, 2001
36
0
0
RO
Hi!

I get a password window with

wndH=FindWindow(vbnullstring,"Enter Network Password")

Now I need to get the text from the user input box and check then 'Save password in the password list'

How can I do it????

Please help

Mircea Serban
 
you could check the password box with something as simple as TAB + SPACE (tab over to the check box and hit space to check it) by simulating key strokes. I can't remember if you can enumerate the window to get the handle for the checkbox, in which case you could use SendMessage to check the box. but a carefully designed key stroke simulator could work 99.9% of the time. you could also check to make sure it worked relatively easily with ScrDC = CreateDC("Display",0,0,&) and GetPixel ScrDC,,, to make sure there are some black pixels in the box. You need to get the screen coords for the window also. I could do it in a few minutes but it might seem like too much work if you are not familiar with the APIs. Do you mean you want to read the user's input? GetAsyncKeyState for this.

 
Thanks jjakes02 for your info

I've solved the problem with SendMessage function

with EDIT class I've get the user and the password inputbox
and with BUTTON class I've get the check box

Mircea Serban
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top