467,138 Members | 1,344 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,138 developers. It's quick & easy.

sending "enter" to text1.text

I want this:

when I press commandbutton1, then the program should send the keystroke
"enter" to text1.text... how can I do this?
Nov 20 '05 #1
  • viewed: 2944
Share:
11 Replies
* "Sven" <f> scripsit:
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.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Hi Herfried

Thanks

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

Sven

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:%2***************@TK2MSFTNGP11.phx.gbl...
* "Sven" <f> scripsit:
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.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3
If Asc(e.KeyChar) = 13 Then

' Place code here

End If

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

Later.

"Sven" <f> wrote in message news:On**************@TK2MSFTNGP09.phx.gbl...
I want this:

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

Nov 20 '05 #4
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

"Donald" <St**************@cox.net> schrieb im Newsbeitrag
news:t5JQb.31565$Mb7.22482@lakeread04...
If Asc(e.KeyChar) = 13 Then

' Place code here

End If

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

Later.

"Sven" <f> wrote in message news:On**************@TK2MSFTNGP09.phx.gbl...
I want this:

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


Nov 20 '05 #5
"Sven" <f> schrieb im Newsbeitrag
news:On**************@TK2MSFTNGP09.phx.gbl...
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?

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
* "Sven" <f> scripsit:
Are you familiar with the .NET CF too? I am programming some programs for my
smartphone and pocketpcs!


..NET CF group:

<news://msnews.microsoft.com/microsoft.public.dotnet.framework.compactframework >

Web interface:

<http://msdn.microsoft.com/newsgroups/default.asp?url=/newsgroups/loadframes.asp?icp=msdn&slcid=us&newsgroup=microso ft.public.dotnet.framework.compactframework>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
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...
"Armin Zingler" <az*******@freenet.de> schrieb im Newsbeitrag
news:uH**************@TK2MSFTNGP09.phx.gbl...
"Sven" <f> schrieb im Newsbeitrag
news:On**************@TK2MSFTNGP09.phx.gbl...
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?

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #8
Ah thanks!!

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:OS****************@TK2MSFTNGP11.phx.gbl...
* "Sven" <f> scripsit:
Are you familiar with the .NET CF too? I am programming some programs for my smartphone and pocketpcs!
.NET CF group:

<news://msnews.microsoft.com/microsof....compactframew
ork>
Web interface:

<http://msdn.microsoft.com/newsgroups...ups/loadframes
..asp?icp=msdn&slcid=us&newsgroup=microsoft.public .dotnet.framework.compactfr
amework>
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #9
"Sven" <f> schrieb
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.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #10
No it is showed automaticly if I press enter!...
"Armin Zingler" <az*******@freenet.de> schrieb im Newsbeitrag
news:OT**************@TK2MSFTNGP09.phx.gbl...
"Sven" <f> schrieb
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.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #11
Ohh, Sorry, I misunderstood the question.

"Sven" <f> wrote in message news:OY**************@tk2msftngp13.phx.gbl...
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

"Donald" <St**************@cox.net> schrieb im Newsbeitrag
news:t5JQb.31565$Mb7.22482@lakeread04...
If Asc(e.KeyChar) = 13 Then

' Place code here

End If

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

Later.

"Sven" <f> wrote in message news:On**************@TK2MSFTNGP09.phx.gbl...
I want this:

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



Nov 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by http://links.i6networks.com | last post: by
2 posts views Thread by Cindy | last post: by
7 posts views Thread by Doug Bell | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.