472,353 Members | 1,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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
11 3117
* "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: http://links.i6networks.com | last post by:
I want to force the users to click submit to submit the forms. How do I disable "Enter Key" which will submit the form automatically when they...
4
by: Simon Wigzell | last post by:
Is there a way to prevent a form submitting when you press enter on a text field? Some people press enter when they finish typing in a text field...
3
by: Luke Chung | last post by:
When I try to enter "" in a field or text box, it disappears. Is it possible to enter a pair of double quotes with no spaces between the quotes...
8
by: ShyGuy | last post by:
Is it possible to use code to enter some text into a combo box and then have the cursor placed at the end of the text for more imput?
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as...
7
by: Doug Bell | last post by:
Hi, I have just built a small application with a form that has one Text Box and one Check Box and a couple of Command Buttons. What I am trying...
3
by: aryayudhi | last post by:
I have a html page that has javascript that works perfectly in IE, but not in Firefox. The use of this javascript to change "Tab" to "Enter" Button....
0
by: roxanaislam | last post by:
Hi: I have a search form in my application which has 4 dropdown list controls, one text box, one "GO" button, one "reset" button. When the "GO"...
4
by: roxanaislam | last post by:
Submitting Form by pressing the "ENTER" key -------------------------------------------------------------------------------- Hi: I have a...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.