:blush: I want a Code allowing the key entered to validate... Net(DotNet) TO CANCEL An OPERATION BY SUPPORT OF KEY ECHAP...
Printable View
:blush: I want a Code allowing the key entered to validate... Net(DotNet) TO CANCEL An OPERATION BY SUPPORT OF KEY ECHAP...
You lost me.
Could you please rephrase the question?
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
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
I updated my previous.
When you hit the enter key in the textbox, the value init will be displayed in a message box.
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!!
try this one
vb Code:
private sub form1_KeyDown(sender as object, e as KeyEventArgs) Handles KeyDown messageBox.show("Bonjour") end sub
private sub form1_KeyDown(sender have object, E have KeyEventArgs) Handles KeyDown messageBox.show("Bonjour")end sub that it gives me anything!!
but a condition! I want that in vb.net 2003
This is really confusing me.
WHAT should react to keypress? A textbox? A form?
What key should react to being pressed? The enter key?
me I want quite simply when I to fill the textbox and I click on entry of keyboard gives me a message
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
is there any difference between keys.Return and keys.Enter?
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