Results 1 to 6 of 6

Thread: System wide Keyboard short cut?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Colorado
    Posts
    83

    System wide Keyboard short cut?

    Anyone know how? Ctrl - Alt - type thing.
    12/32/84 - I need some code to make me a sandwhich.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    what do you mean ??

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Colorado
    Posts
    83
    What I mean is, my app is hidden. So when a user press's for example ctrl + alt + whatever, then it would show itself.

    I do have an example in VB6 that I am trying to conver but with no luck:

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.    
    5.     Subclass Me
    6.    
    7.     RegisterHotKey Me.hWnd, 1&, MOD_WIN, Asc("G")   ' Upper Case
    8.     RegisterHotKey Me.hWnd, 2&, MOD_WIN, Asc("g")   ' Lower Case
    9.    
    10.     'Note: the 1& and the 2& must increment for each registered hot-key
    11.    
    12. End Sub
    13.  
    14. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    15.    
    16.     Unsubclass
    17.    
    18. End Sub
    19.  
    20. Public Sub HotKey(dwKey As Long, dwShift As Long)   ' Called from WndProc
    21.        
    22.     If (dwKey = Asc("G") Or dwKey = Asc("g")) And (dwShift = MOD_WIN) Then
    23.         Visible = Not Visible
    24.     End If
    25.    
    26. End Sub
    12/32/84 - I need some code to make me a sandwhich.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    try this ....
    Attached Files Attached Files

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Colorado
    Posts
    83
    Thank you! Works like a charm. I almost gave up on this idea.
    12/32/84 - I need some code to make me a sandwhich.

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Well , it's VB6 Code that I used to use ... but I'm looking for .NET way .I bet there are many ways around but seems out of reach ... maybe through DX . Yes I guess

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