Results 1 to 4 of 4

Thread: [RESOLVED] SendKeys.Send() to password textbox.

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2008
    Location
    Texas
    Posts
    1,288

    Resolved [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.
    You down with OOP? Yeah you know me!
    MCAD and MCMICKEYMOUSE (vb.net)

    ----

    If it even kinda helps... rate it : )

    Edit a Multi-page .tif file and save.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    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!

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2008
    Location
    Texas
    Posts
    1,288

    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
    You down with OOP? Yeah you know me!
    MCAD and MCMICKEYMOUSE (vb.net)

    ----

    If it even kinda helps... rate it : )

    Edit a Multi-page .tif file and save.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2008
    Location
    Texas
    Posts
    1,288

    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
    You down with OOP? Yeah you know me!
    MCAD and MCMICKEYMOUSE (vb.net)

    ----

    If it even kinda helps... rate it : )

    Edit a Multi-page .tif file and save.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width