DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Hotkeys

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Hotkeys

    [Originally posted by Manish Wadhera]

    how can i make a combination of three keys to perform a single task.
    eg: Ctrl + Shift + A

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Hotkeys

    [Originally posted by Greg DeBacker]

    Put this code in the Form_KeyDown() event and set the forms KeyPreview property to true.

    Greg
    Dim ShiftDown As Boolean
    Dim CtrlDown As Boolean

    Const vbShiftMask = 1
    Const vbCtrlMask = 2

    ShiftDown = (Shift And vbShiftMask) > 0
    CtrlDown = (Shift And vbCtrlMask) > 0
    If KeyCode = vbKeyA Then
    If ShiftDown And CtrlDown Then
    MsgBox "Shift + Control + A"
    End If
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center