|
-
Feb 8th, 2013, 02:49 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] SendKeys.Send() to password textbox.
Ok so I have a virtual keyboard I've made and I was having issues at first with the focusing so I just changed from using buttons to labels.
Now my problem is that when I have my cursor in the external app's password textbox, sendkeys.send() works intermittently as if there is a focus issue again.. I've tried googling for answers, but I can't find anything useful.
If I flag the UseSystemPasswordChar or whatever to false, it works as expected. Oh, both apps are vb.net forms applications (keyboard and external app).
Any help would be appreciated.
Thanks,
Justin
Last edited by MonkOFox; Feb 8th, 2013 at 02:55 PM.
-
Feb 8th, 2013, 03:15 PM
#2
Re: SendKeys.Send() to password textbox.
sendkeys.send() works intermittently
Er ... yeah .. it does. They'll be writing it on SendKeys' gravestone! You may have more success using the clipboard. You'll still need SendKeys for the Ctrl+V but as it's a higher level key combination it's likely to be more successful.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Feb 8th, 2013, 04:18 PM
#3
Thread Starter
Frenzied Member
Re: SendKeys.Send() to password textbox.
What I'm saying is that when I'm sending keys to the other window and the non-password textbox is the focused control,
then the sendkeys.send works every time. Only when the password textbox is the focused control does the sendkeys.send
not work correctly (it takes like 50 clicks to get the key to get passed).
If I make the password text box, not be a password textbox, again, it works.
So there is something I'm not doing right and I'm hoping someone else has ran into this password textbox specific problem as well.
Justin
-
Feb 12th, 2013, 03:32 PM
#4
Thread Starter
Frenzied Member
Re: SendKeys.Send() to password textbox.
I ended up just making the keyboard an actual form that was bundled with my application. I just created a reference to it and then sendkeys.send() worked much better for some reason. I still used the SetForeGroundWindow() or whatever but I didn't have to use FindWindow or FindWindowEx, I could just do Form.Handle.
Glad that's over with!
Thanks again,
Justin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|