Question

Locked

VB2010: Actions on Click?

By Conor:L ·
Hey People,

Me again, im moving on to different programs now.

Could someone assist me in advising me how to make buttons in VB2010 work so that if i click them it fills a login box.

So on click it would fill:

Username: testuser1
PAssword: password1
Domain: testdomain

And it would then optionally hit the Enter.

I know its possible just cant think of how at the moment.

Help Please.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Are you trying to make one application fill out another?

by Slayer_ In reply to VB2010: Actions on Click?

You will need the API's FindWindow, FindWindowEx, SendMessage and the constant WM_SetText
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633500(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632644(v=vs.85).aspx


Use FindWindow and FindWindowEX to get the HWND value to use in SendMessage. Pass WM_SetText to SendMessage so that the API knows what you are trying to do.

To press enter, you need to get the HWND value of the button and sendmessage the constant BM_Click
You can google how to use these functions.

Back to Windows Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums