Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coding question
#2
No timer needed , heres the code:

Code:
Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.KeyCode = System.Windows.Forms.Keys.F12 Then
            MsgBox("You Clicked F12")
        End If
    End Sub

Set the "KeyPreview" property to "True" on form1

If you cant see it use this code in the "Form1_load" event :
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        KeyPreview = True
    End Sub
Reply


Messages In This Thread
Coding question - by ElephantShoe - 12-29-2009, 01:26 PM
RE: Coding question - by dunlop03 - 12-29-2009, 01:58 PM
RE: Coding question - by ElephantShoe - 12-29-2009, 05:40 PM
RE: Coding question - by thanasis2028 - 12-30-2009, 04:33 AM
RE: Coding question - by dunlop03 - 12-30-2009, 07:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with coding jerrojack 1 884 12-29-2011, 03:27 AM
Last Post: AceInfinity
  Coding-Central.net - Coding, cracking and webmastering. w00pz 5 2,448 09-02-2011, 01:43 PM
Last Post: AceInfinity
  Help Coding A Downloader? Fragma 9 3,436 08-25-2011, 06:10 PM
Last Post: LiveModz
  .Net Coding Challenge #5 iCrack 18 5,944 05-21-2011, 12:49 AM
Last Post: thanasis2028
  [TUT]Improve your Coding[VB] ThePrinCe 10 1,832 05-07-2011, 06:40 PM
Last Post: Inventor

Forum Jump:


Users browsing this thread: 2 Guest(s)