sending "enter" to text1.text

  • Thread starter Thread starter Sven
  • Start date Start date
S

Sven

I want this:

when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?
 
* "Sven said:
when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?

Have a look at the 'SendKeys' class and its 'Send' method.
 
Hi Herfried

Thanks

Are you familiar with the .NET CF too? I am programming some programs for my
smartphone and pocketpcs!

Sven
 
If Asc(e.KeyChar) = 13 Then

' Place code here

End If

Put that in thje keypress sub of the textbox, should work then.

Later.
 
Hi

Thanks for you answer but that's not what I am looking for!
I want to send a keystroke to another object and not capture keystrokes!

Sven
 
Sven said:
I want this:

when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?

Is it a multiline textbox?
 
Oh sorry I mean combobox not textbox!
In VB.NET CF Smartphone: if I press Enter on my smartphone on a combobox it
is showing all entrys! I know that in VB.NET I can show all entrys with
combobox1.DroppedDown but that's not supported in CF...
 
Sven said:
Oh sorry I mean combobox not textbox!
In VB.NET CF Smartphone: if I press Enter on my smartphone on a
combobox it is showing all entrys! I know that in VB.NET I can show
all entrys with combobox1.DroppedDown but that's not supported in
CF...

I don't know the CF so I have to ask: Did _you_ write the code to show all
entries when enter is pressed in the combobox or is it done automatically?
If you wrote the code, you could also call it when the button is clicked.
 
Ohh, Sorry, I misunderstood the question.

Sven said:
Hi

Thanks for you answer but that's not what I am looking for!
I want to send a keystroke to another object and not capture keystrokes!

Sven
 
Back
Top