Results 1 to 3 of 3

Thread: Left and Right Control keys.

  1. #1
    Guest

    Question

    I need to know the diff between the left and right control keys. Hey and if I can get the anwser for the left and right on the alt and shift that would great!

    This is what I have... Help?

    Private Sub Timer1_Timer()
    Dim ctl As Boolean
    Dim dwn As Boolean

    If GetAsyncKeyState(vbKeyControl) Then
    ctl = True
    End If

    If GetAsyncKeyState(vbKeyDown) Then
    dwn = True
    End If

    If dwn And ctl = True Then
    Dim result As Long
    result = SendMessage(Form1.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&)
    End If

    End Sub

  2. #2
    Guest
    Take a look at this thread which shows you how to detect the left or right control keys.

  3. #3
    Guest
    If you have Windows NT, then you can use the VK_LCONTROL and VB_RCONTROL constants.

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