473,657 Members | 2,445 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 3206
* "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
33289
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
16644
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
2168
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
3127
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
7182
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 what i expect ----- BUT .... then the
7
5710
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 Button has the focus, it will initiate the Click event I have set the Forms CancelButton to the...
3
4166
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 this problem. Thanks, Arya ======== This is the script : <script language="javascript"...
0
1656
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 <input type="text" style="display:none"> after the <form> tag in the HTML section. Now if my cursor...
4
3874
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 displayed. When I press the "enter" key nothing happens. I want to submit the form by pressing the "enter"...
0
8310
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4155
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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
2
1615
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.