yewmeng Posted February 26, 2004 Posted February 26, 2004 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 ? Quote
Heiko Posted February 26, 2004 Posted February 26, 2004 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. Quote .nerd
yewmeng Posted February 26, 2004 Author Posted February 26, 2004 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 Quote
Moderators Robby Posted February 26, 2004 Moderators Posted February 26, 2004 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. Quote Visit...Bassic Software
yewmeng Posted February 26, 2004 Author Posted February 26, 2004 just found it sorry to ask the silly question heiko and Robby, thx so much :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.