[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
Re: SendKeys.Send() to password textbox.
Quote:
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.
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
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