| | |
How do i use the keyboard in my code?
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
Set KeyPreview Property of Form1 at design time.
VB.NET Syntax (Toggle Plain Text)
Public Class Form1 Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.F1 Then MsgBox("F1 is pressed") Else If e.KeyCode = Keys.Escape Then MsgBox("Esc is pressed") End If End If End Sub End Class
Failure is not fatal, but failure to change might be. - John Wooden
![]() |
Similar Threads
- enter key (VB.NET)
- iso question (Getting Started and Choosing a Distro)
- It's cinfull! (C++)
- Homework again...just want help reading...for now... (C++)
- My main page is "http://rl.webtracer.cc/-/?bayzm" no matter what i do to change it... (Viruses, Spyware and other Nasties)
- Number of times a number appears in an array (C++)
- String Array (C)
- select statemt LIKE (MySQL)
- Keyboard input or "stuck in a loop" (C++)
- Encoding/Decoding (C)
Other Threads in the VB.NET Forum
- Previous Thread: Writing to an XML without overwriting data
- Next Thread: form design
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year






