|
-
Mar 15th, 2004, 10:11 PM
#1
Thread Starter
Member
Textbox value entering
hey,
is there i way i can have an event triggered by hitting enter in a text box?
Like, instead of having a button that checks to see whats in a text box and then using that statement to perform an action, can i just have it to where when your done typing you hit enter and it checks the value and then performs the action?
Tried doing "textValuechanged" but the problem with that is that once the value of the text box is inputed, i cant clear the text without performing the action again.
(one of the things im doing is a toggle type thing, so whenever i try to delete it it unchanges what i had the text value change)
Thanks in advanced, and if no one can help, oh well, thanks anyway.
---Flac
Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.
-
Mar 16th, 2004, 12:00 AM
#2
Sleep mode
Like this ?
VB Code:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Asc(e.KeyChar) = 13 Then
CallMe()
End If
End Sub
Private Sub CallMe()
MessageBox.Show("You just pressed Enter")
End Sub
-
Mar 16th, 2004, 02:28 PM
#3
Thread Starter
Member
Hey, thanks a lot, just gotta figure out how to apply it to what im doing. But ya, thats what i was looking for.
---Flac
Everything great once started with the words "That will never catch on, you shouldnt even bother" be great, go against the crowed, do something stupid, you might become famous.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|