Befuddled about SendKey

  • Thread starter Thread starter Christy Davids
  • Start date Start date
C

Christy Davids

Hi guys,

I'm trying to use System.Windows.Forms.SendKeys.Send({UP})
to programmatically send an up arrow keystroke to my
application. According to the .NET Framework class
library documentation, this is the correct syntax (i.e.
using UP inside braces to indicate the up arrow key), but
when I do so I get an "expression expected" compiler error.

What am I missing here?

TIA! :)
Christy
 
SendKeys.Send requires a string as the parameter. Enclose {UP} in
quotations to make it a string.
 
Thanks guys.

I swear I'd tried that, as well as declaring a string,
assigning it a value of "{UP}" and passing it to
SendKeys.Send... but I must have had a typo or something
because I couldn't get it to work. Anyway, works fine now.

Christy (feeling stupid)
 
Back
Top