Link to home
Start Free TrialLog in
Avatar of jaxrpc
jaxrpc

asked on

Using System.forms.sendkeys.send

Hi, I am trying to make a keyboard to be used with a touchscreen.
I tried set forcus on a textbox and use system.form.sendkeys.send("A") and it worked. According to the .NET Framework reference it says...if to enter special characters dont not show i will have to use the codes.
For e.g. {BACKSPACE} will do the backspace keystroke.

However i am not sure how to use the code. I tried doing it ...... system.form.sendkeys.send("{BACKSPACE}") but it won't work... any ideas how can i get it to work with set forcus on a textbox?

thanks alot
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Hello jaxrpc,
--------

>> with set focus on a textbox
worked for me like

    TextBox1.Focus()
    System.Windows.Forms.SendKeys.Send("{BACKSPACE}")

that was on a buttonclick did you use an other event?

--------
bruintje
sharing what you know, learning what you don't
Avatar of jaxrpc
jaxrpc

ASKER

Hi thanks for replying.... what about capslock..... i tried system.windows.forms.sendkeys.send("{CAPSLOCK}") and after that system.windows.forms.sendkeys.send("A") it doesn't change "A" to "a" or it doesnt work this way?
ASKER CERTIFIED SOLUTION
Avatar of neilprice
neilprice

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial