Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi all

how do use key press event?

for example i want pop up a message box when i key in 1 in my textbox.

 

i found some code at internet

Private Sub txtKeyPress_KeyPress( _

ByVal sender As System.Object, _

ByVal e As KeyPressEventArgs) _

Handles txtKeyPress.KeyPress

 

but how i get this code? i need 2 type manually ?

Posted

In the IDE, above your window with the code in it,

 

in the left ComboBox select the item (the textbox). Then in the left ComboBox select the event (KeyPress).

 

Then the required method signature will automatically be added to your code.

.nerd
Posted

sorry im not understand what did u trying to tell me.

what is ide? and is that the combobox u mention is above the properties.

 

please elaborate more

 

thx in advance

  • Moderators
Posted

Heiko mentioned the IDE, this is the Visual Studio environment.

 

You can double-click a button or textbox, this will write the code of the default event.

If you want an event that is not the default then you need to scroll to the control (combobox in the top-left of your code page) once you select the control then in the right-hand combo select the event you want.

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...