Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding a down arrow into a string

Status
Not open for further replies.

dpdg

Programmer
May 23, 2005
148
US
I've got a program that has to capture certain keys. For example, I use Chr(13) for 'Enter', Chr(9) for a 'Tab', which I embed in a string with other characters. Since there is no way to use the keyboard or mouse for input, everything has to be done programatically, including the key strokes.

Ex:
Code:
str = "Value1" & Chr(9) & "ValueOfNextTextBox" & Chr(9) & "ValueOfNextTextBox" & Chr(13)
 
WriteToPort(str)
In this one instance I need to embed a 'down arrow' character since when there is a list of radio buttons I have to send a 'down arrow' key to select the second one in the group. How do I embed the down arrow into my string?
 
I tried this:

Code:
str = "Value1" & Chr(9) & "ValueOfNextTextBox" & Chr(9) & "ValueOfNextTextBox" & System.Windows.Forms.SendKeys.Send("{DOWN}")
 
WriteToPort(str)

But I get an a squiggly line under the System.Windows.Forms.SendKeys.Send("{DOWN}") with an error saying 'Expression does not produce a value'

Still trying...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top