I have created my own virtural keyboard for a touch screen interface. I used two forms,one for the main program and one for my keyboard so the keyboard will have opacity of 90%.
in my main program form's login screen, i have two textboxs, one for username one for password. the password is a textbox with UseSystemPasswordChar property set to True.
I used the technique descripted here:
How to: Simulate Mouse and Keyboard Events in Code
to send a keycode to different form window.
1. get window handler using FindWindow()
2. set main program form as focused window by SetForgoundWindow()
3. then sendkeys.send(keycodes)
it worked perfectly when i try to input letters to the username by the virtual keyboard, but it not really working for the password textbox.
Strange
when i set the password textbox 's UseSystemPasswordChar to False
again it worked.
Why why why why?
if i put my virtual keyboard as one of the controls of my main program form it also works but i then don't have the opacity property for my keyboard. of course, in this case the Findwindow() and setforgroundwindow() is not needed.
in my main program form's login screen, i have two textboxs, one for username one for password. the password is a textbox with UseSystemPasswordChar property set to True.
I used the technique descripted here:
How to: Simulate Mouse and Keyboard Events in Code
to send a keycode to different form window.
1. get window handler using FindWindow()
2. set main program form as focused window by SetForgoundWindow()
3. then sendkeys.send(keycodes)
it worked perfectly when i try to input letters to the username by the virtual keyboard, but it not really working for the password textbox.
Strange
when i set the password textbox 's UseSystemPasswordChar to False
again it worked.
Why why why why?
if i put my virtual keyboard as one of the controls of my main program form it also works but i then don't have the opacity property for my keyboard. of course, in this case the Findwindow() and setforgroundwindow() is not needed.