|
-
Jun 8th, 2007, 08:32 AM
#1
Thread Starter
Member
Code allowing the key entered to validate
I want a Code allowing the key entered to validate... Net(DotNet) TO CANCEL An OPERATION BY SUPPORT OF KEY ECHAP...
-
Jun 8th, 2007, 08:34 AM
#2
Re: Code allowing the key entered to validate
You lost me.
Could you please rephrase the question?
-
Jun 8th, 2007, 08:35 AM
#3
Fanatic Member
Re: Code allowing the key entered to validate
use textBox_Kepress() event
vb Code:
private sub textBox1_KeyPress(sender as objectm, e as KeyEventArgs)
if e.KeyCode = keys.Enter then
messageBox.show(textBox1.text)
end if
end sub
Last edited by talkro; Jun 8th, 2007 at 08:45 AM.
-
Jun 8th, 2007, 08:40 AM
#4
Thread Starter
Member
Re: Code allowing the key entered to validate
Thank you initially for your answer then me I have a textbox then I want to click on the entered key of keyboard I want post a message which contain the value which J have déja typed on this textbox
-
Jun 8th, 2007, 08:46 AM
#5
Fanatic Member
Re: Code allowing the key entered to validate
I updated my previous.
When you hit the enter key in the textbox, the value init will be displayed in a message box.
-
Jun 8th, 2007, 08:50 AM
#6
Thread Starter
Member
Re: Code allowing the key entered to validate
but me J made
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal E Have KeyEventArgs) Yew e.KeyCode = Keys.enter Then MsgBox("bonjour") End If End Sub
then when I click on entry of keyboard it posts anything!!
-
Jun 8th, 2007, 08:58 AM
#7
Fanatic Member
Re: Code allowing the key entered to validate
try this one
vb Code:
private sub form1_KeyDown(sender as object, e as KeyEventArgs) Handles KeyDown
messageBox.show("Bonjour")
end sub
-
Jun 8th, 2007, 09:03 AM
#8
Thread Starter
Member
Re: Code allowing the key entered to validate
private sub form1_KeyDown(sender have object, E have KeyEventArgs) Handles KeyDown messageBox.show("Bonjour")end sub that it gives me anything!!
-
Jun 8th, 2007, 09:04 AM
#9
Thread Starter
Member
Re: Code allowing the key entered to validate
but a condition! I want that in vb.net 2003
-
Jun 8th, 2007, 09:08 AM
#10
Re: Code allowing the key entered to validate
This is really confusing me.
WHAT should react to keypress? A textbox? A form?
What key should react to being pressed? The enter key?
-
Jun 8th, 2007, 09:12 AM
#11
Thread Starter
Member
Re: Code allowing the key entered to validate
me I want quite simply when I to fill the textbox and I click on entry of keyboard gives me a message
-
Jun 8th, 2007, 09:15 AM
#12
Re: Code allowing the key entered to validate
Heres an example:
VB.Net Code:
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Return Then
MessageBox.Show("You pressed enter")
End If
End Sub
-
Jun 8th, 2007, 09:19 AM
#13
Fanatic Member
Re: Code allowing the key entered to validate
is there any difference between keys.Return and keys.Enter?
-
Jun 8th, 2007, 09:23 AM
#14
Thread Starter
Member
Re: Code allowing the key entered to validate
good with keys.return it goes t-pieces well then when I click on entry it posts me the message but with keys.enter No
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
|