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.

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

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.

Related Discussions

Related Forums