473,545 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem saving txt box with enter key

Guys,

I have a text box. I simply want to save the text from the text box
(and popluate a buttons text) and remove the text box when a user hits
the enter button.

Can someone help?
Private Sub RenameToolStrip MenuItem_Click( ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
RenameToolStrip MenuItem.Click

Dim NewTxtBox As New TextBox
NewTxtBox.Locat ion = ActiveControl.L ocation
Me.Controls.Add (NewTxtBox)
Dim KeyAscii As Keys
If KeyAscii = Keys.Enter Then
Me.Controls.Rem ove(NewTxtBox)
ActiveControl.T ext = NewTxtBox.Text
End If
End Sub

Nov 25 '06 #1
3 1130
Marc. Examples that will help you find the answer to almost every question
you have asked in the past few days (in this newsgroup) can be found in the
VS2005 documentation which can be accessed by pressing F1 whilst in the
VS2005 IDE.

Have you actually bothered to look there?
"Marc" <ma*********@ho tmail.comwrote in message
news:11******** **************@ 45g2000cws.goog legroups.com...
Guys,

I have a text box. I simply want to save the text from the text box
(and popluate a buttons text) and remove the text box when a user hits
the enter button.

Can someone help?
Private Sub RenameToolStrip MenuItem_Click( ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
RenameToolStrip MenuItem.Click

Dim NewTxtBox As New TextBox
NewTxtBox.Locat ion = ActiveControl.L ocation
Me.Controls.Add (NewTxtBox)
Dim KeyAscii As Keys
If KeyAscii = Keys.Enter Then
Me.Controls.Rem ove(NewTxtBox)
ActiveControl.T ext = NewTxtBox.Text
End If
End Sub

Nov 25 '06 #2
Yes its not there

Stephany Young wrote:
Marc. Examples that will help you find the answer to almost every question
you have asked in the past few days (in this newsgroup) can be found in the
VS2005 documentation which can be accessed by pressing F1 whilst in the
VS2005 IDE.

Have you actually bothered to look there?
"Marc" <ma*********@ho tmail.comwrote in message
news:11******** **************@ 45g2000cws.goog legroups.com...
Guys,

I have a text box. I simply want to save the text from the text box
(and popluate a buttons text) and remove the text box when a user hits
the enter button.

Can someone help?
Private Sub RenameToolStrip MenuItem_Click( ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
RenameToolStrip MenuItem.Click

Dim NewTxtBox As New TextBox
NewTxtBox.Locat ion = ActiveControl.L ocation
Me.Controls.Add (NewTxtBox)
Dim KeyAscii As Keys
If KeyAscii = Keys.Enter Then
Me.Controls.Rem ove(NewTxtBox)
ActiveControl.T ext = NewTxtBox.Text
End If
End Sub
Nov 26 '06 #3
What do you mean by 'Yes its not there'?

Do you mean that you have looked and you can't find it, or do you mean that
when you press F1, the help/documentation does not appear?

If it is the latter then install your copy of VS2005 correctly.

If it is the former then try a few searches on pertinent keywords.

In the index, typing keys.e brings up a entry named Keys.ControlKey
enumeration member which in turn provides an example of hooking up an event
that will handle the pressing of a key.
"Marc" <ma*********@ho tmail.comwrote in message
news:11******** **************@ n67g2000cwd.goo glegroups.com.. .
Yes its not there

Stephany Young wrote:
>Marc. Examples that will help you find the answer to almost every
question
you have asked in the past few days (in this newsgroup) can be found in
the
VS2005 documentation which can be accessed by pressing F1 whilst in the
VS2005 IDE.

Have you actually bothered to look there?
"Marc" <ma*********@ho tmail.comwrote in message
news:11******* *************** @45g2000cws.goo glegroups.com.. .
Guys,

I have a text box. I simply want to save the text from the text box
(and popluate a buttons text) and remove the text box when a user hits
the enter button.

Can someone help?
Private Sub RenameToolStrip MenuItem_Click( ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
RenameToolStrip MenuItem.Click

Dim NewTxtBox As New TextBox
NewTxtBox.Locat ion = ActiveControl.L ocation
Me.Controls.Add (NewTxtBox)
Dim KeyAscii As Keys
If KeyAscii = Keys.Enter Then
Me.Controls.Rem ove(NewTxtBox)
ActiveControl.T ext = NewTxtBox.Text
End If
End Sub

Nov 26 '06 #4

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

Similar topics

2
1555
by: lemming | last post by:
I'd like to save the current record only with "enter" and noch with "shift-enter" (default). Has anyone an idea ? Thanks, Klaudia
13
7377
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've created forms for both those tables, and inserted the child table form into the master table form as a subform. It works just as it is supposed to, in...
11
2833
by: kaosyeti | last post by:
i have a form that records 9 fields into a table. on that form i have a 'done' button to close the form. right now, if the form is fully filled in, but you don't press 'enter' before you click 'done', then it closes the form without saving the record. can i change this? thanks. -- Message posted via AccessMonster.com...
5
2570
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order date, name, address etc) about the selected row in the datagrid... My problem is when I enter a new record in the details tabpage (saves data...
3
6659
by: Jim Devenish | last post by:
In my application vehicles arrive and depart from a workshop. The ArrivalDate and the HandoverDate are each entered. Sometimes the person who should enter the arrival date forgets to do so. When the vehicle is handed over to the customer and the HandoverDate is entered I wish to warn about the possibly missing ArrivalDate. In the...
7
2672
by: ConfusedAlot | last post by:
This is my code for a database, whenever i save the database to the file 'database.txt' and display the results i get this; name - (correct, is what i put in) pin - 3435973836 slew rate - -9.25596e+061 these values are the same for every entry i add, i cant seem fo figure out why. Plus, the text file i save to is supposed to have the...
8
3429
by: Net | last post by:
Hi Please help. I have a database which requires a message to come up when certain part numbers are added to it. I have solved part of this by using a conditional macro eg = 54125 and using a msg box. This works fine until a part no. which contains a letter is used eg B6541. Access changes the criteria in the condition box to Part No]= and...
0
1539
by: Magnus Bergh | last post by:
I am developing an application for pocketpc and this involvs a but of juggling with different forms. I have an "order entry" type of application. On the main form I have a grid which displays Order headers. Let call this form "OrderList" From this view I edit/enter new orders by opening a new form for entering data. This is done using...
18
2662
by: Marilyth | last post by:
I am using Windows XP and Access 2003. I have searched through my HUGE book & the questions here, and found some items that "might" help, but unsure still. I am still getting versed on Access. I know there are expressions, however the order and manner in which they need to be phrased is still a work in progress. I am looking for help...
0
7496
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
7428
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...
0
7685
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. ...
1
7452
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...
0
7784
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...
0
6014
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...
0
5071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3485
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...
1
1916
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

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.