473,569 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3201
* "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******** *******@TK2MSFT NGP11.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******** ******@TK2MSFTN GP09.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.3156 5$Mb7.22482@lak eread04...
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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP09.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.microsof t.com/microsoft.publi c.dotnet.framew ork.compactfram ework>

Web interface:

<http://msdn.microsoft. com/newsgroups/default.asp?url =/newsgroups/loadframes.asp? icp=msdn&slcid= us&newsgroup=mi crosoft.public. dotnet.framewor k.compactframew ork>

--
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.Dropp edDown but that's not supported in CF...
"Armin Zingler" <az*******@free net.de> schrieb im Newsbeitrag
news:uH******** ******@TK2MSFTN GP09.phx.gbl...
"Sven" <f> schrieb im Newsbeitrag
news:On******** ******@TK2MSFTN GP09.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******** ********@TK2MSF TNGP11.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&newsgr oup=microsoft.p ublic.dotnet.fr amework.compact fr
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.Dropp edDown 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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
33280
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 entered the data in text field then pressed "enter key"
4
16641
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 out of habit I guess unconcsciously thinking it will take them to the next field. Instead it submits the form and this causes all kinds of problems in my case. Any javascript solution?
3
2165
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 into a field? Luke
8
3117
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
7167
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 yet). I have placed a javascript function on a server side textbox control to do something - eg change the words on label - when the key pressed is the "enter" key. I can see the label change to...
7
5706
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 to achieve is that if the Text Box has focus and the User hits the "Enter" button the focus will move to the next Tab item (i.e. the Check Box). Likewise on the Check Box but obviously if a Command...
3
4164
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. When we press Tab, it is like when we press Enter button. How to make this script can be run on Firefox? I would be grateful to anybody who can help me on this, as I have got out of my depth with...
0
1648
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" button is clicked the form gets submitted and the results page is displayed. When I press the "enter" key nothing happens. I want to submit the form by pressing the "enter" key also. I have placed...
4
3870
by: roxanaislam | last post by:
Submitting Form by pressing the "ENTER" key -------------------------------------------------------------------------------- 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" button is clicked the form gets submitted and the results page is...
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.