home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / hotkey_1 / hotkey.frm (.txt) < prev    next >
Visual Basic Form  |  1991-07-27  |  6KB  |  90 lines

  1. Form1
  2. HotKey Demo
  3. Form1
  4. FormIcon
  5. FormIcon
  6. Form_Click
  7. CreateHK
  8. VKCode
  9. Mask]
  10. hWndL
  11. MyCode
  12. KillHK(
  13. hHotKey    
  14. @    Form_Load
  15. Form_KeyDown
  16. KeyCode
  17. Shift
  18. Form1
  19. HotKey
  20. Form_Unload
  21. Cancel
  22. List1
  23. Addline
  24. HotKey1
  25. HotKey2
  26. ShiftF9g
  27. Shift_F9
  28. Ctrl_T
  29. Ctrl_D
  30.     ShiftMask
  31. CtrlMask
  32. AltMask
  33. SCA_F102
  34. VK_F7
  35. UserVK    
  36. VK_F9
  37. Shift_F
  38. FormIcon
  39. Picture
  40. Key_F7
  41. KEY_F8Q
  42. Key_F9
  43. Key_F10
  44. WindowState
  45. hotkey.dll
  46. hotkey.dll
  47. These are from CONSTANT.TXTT
  48. These you just make up!F
  49. These are from page 277 of the Programmer's Guideo
  50. These will be the returned "hot key handles"
  51. Form_Load
  52. This is where I create my hotkeys.
  53. The first paramter is the actual KeyCode I want to trapp
  54. These can be found in CONSTANT.TXT
  55. The Second paramter is the Shift mask, modeled after the
  56. one used in the low level keyboard events.
  57. See page 277 of the Programmer's Guide
  58. The third parameter is our window's handle (hWnd property)
  59. Finally, the fourth parameter is the number we wantt
  60. HOTKEY.DLL to send us when out hotkey is recognizedt
  61. The return paramter is the "handle" of the hot key
  62. The only purpose of this number is to pass to KillHK
  63. F7 to Exit
  64. Shift-F9 to Toggle the Icon"
  65. Ctrl-T to Insert the Current Time"
  66. Ctrl=D to Insert the Current Date"
  67. Shift-Ctrl-Alt-F10 for a Surprise!
  68. Hit...
  69. The point is to have focus elsewhere so we shell out
  70. to NotePad
  71. NOTEPAD.EXE"
  72. Form_KeyDown
  73. This is our "hot key" handlerr
  74. It is rare that this event will ever be triggeredd
  75. otherwise because the form has to have focus which
  76. practically never happens.  However, whether it does
  77. or not, makes no difference to HOTKEY.DLLL
  78. User wants to exit
  79. Toggle the iconx
  80. Put the time in the app with focus
  81. Put the date in the app with focus
  82. Pop up a silly message
  83. That was a lot of work for nothing, huh?
  84. Whew!"
  85. Form_Unload
  86. If we are well behaved, we need to call KillHK
  87. for every hotkey we created so that they can bee
  88. used by other programs and searching will be
  89. faster
  90.