M
Marc
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 RenameToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RenameToolStripMenuItem.Click
Dim NewTxtBox As New TextBox
NewTxtBox.Location = ActiveControl.Location
Me.Controls.Add(NewTxtBox)
Dim KeyAscii As Keys
If KeyAscii = Keys.Enter Then
Me.Controls.Remove(NewTxtBox)
ActiveControl.Text = NewTxtBox.Text
End If
End Sub
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 RenameToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
RenameToolStripMenuItem.Click
Dim NewTxtBox As New TextBox
NewTxtBox.Location = ActiveControl.Location
Me.Controls.Add(NewTxtBox)
Dim KeyAscii As Keys
If KeyAscii = Keys.Enter Then
Me.Controls.Remove(NewTxtBox)
ActiveControl.Text = NewTxtBox.Text
End If
End Sub