Results 1 to 3 of 3

Thread: Key_Down event problem [Resolved]

  1. #1

    Thread Starter
    Addicted Member DKasler's Avatar
    Join Date
    Jan 2005
    Location
    Brooklyn, NYC
    Posts
    177

    Key_Down event problem [Resolved]

    Ok... Im trying to run this code:

    VB Code:
    1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    2.     If KeyCode = vbKeyF2 Then
    3.         LockWorkStation
    4.     End If
    5. End Sub

    which in turn should execute this code:

    VB Code:
    1. Private Declare Function LockWorkStation Lib "user32.dll" () As Integer

    But nothing at all is happening when the form loads and you hit the 'F2' key. Any thoughts?
    Last edited by DKasler; Jan 13th, 2005 at 06:55 PM.
    -----MY SITES-----
    BayRidgeNights.Com - NYC Nightlife Forums

    Fight Communism - Rate Posts!

  2. #2

  3. #3

    Thread Starter
    Addicted Member DKasler's Avatar
    Join Date
    Jan 2005
    Location
    Brooklyn, NYC
    Posts
    177

    Re: Key_Down event problem [Resolved]

    Awesome... Thanks.
    -----MY SITES-----
    BayRidgeNights.Com - NYC Nightlife Forums

    Fight Communism - Rate Posts!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width