Hotkey Control

Properties	Events

Description

Hotkey is a vbx for use in pop-up type applications. You can define the hot-key and the vbx will fire its event whenever that key is pressed from anywhere in windows.

Remarks

Any normal key can be used as the hot key. A list of keys, and constants for use in setting the vbxs properties can be found in the KEYCODES.BAS file.


Properties

HotKeyCode

HotKeyAlt


HotKeyAlt Property

If you require the hot key to be an Alt key combination, with the key defined in the HotKeyCode property, then set this property to 1, else set it to 0.


HotKeyCode Property

This is the virtual key code of the hot key. The file KEYCODES defines consts of all the key codes you can use.

See Virtual Key Codes for values.

Once the property has been set, the hot key is active, and as soon as it is pressed the Fire Event will be fired.

This property can be set to 0 to disable a hot key which may be live.

Note that the hot key is one-shot, and once fired will be disabled until you manually enable it again.


Events

Fire


Fire Event

This event is fired when a live hot key is pressed.

Note that this event is one-shot, and once fired, the hot key will be disabled, and will need to be set again (via the HotKeyCode property) before it can get fired again.


Virtual Key Codes

The following is a list of the virtual key codes, which you use to set the HotKeyCode property. NB All values are defined as consts inthe KEYCODES.BAS file.

 LBUTTON = 1

 RBUTTON = 2

 CANCEL = 3

 MBUTTON = 4

 BACK = 8

 TAB = 9

 CLEAR = 12

 RETURN =  13

 SHIFT =  16

 CONTROL =  17

 MENU =  18

 PAUSE =  19

 CAPITAL =  20

 ESCAPE =  27

 SPACE =  32

 PRIOR =  33

 NEXT =  34

 END =  35

 HOME =  36

 LEFT =  37

 UP =   38

 RIGHT =   39

 DOWN =   40

 SELECT =   41

 PRINT =   42

 EXECUTE =   43

 SNAPSHOT =   44

 INSERT =   45

 DELETE =   46

 HELP =   47

A thru Z are the same as their ASCII equivalents: 'A' thru 'Z'

0 thru 9 are the same as their ASCII equivalents: '0' thru '0'

 NUMPAD0 =  97

 NUMPAD1 =  98

 NUMPAD2 =  99

 NUMPAD3 =  100

 NUMPAD4 =  101

 NUMPAD5 =  102

 NUMPAD6 =  103

 NUMPAD7 =  104

 NUMPAD8 =  105

 NUMPAD9 =  106

 MULTIPLY =  107

 ADD =  108

 SEPARATOR =  109

 SUBTRACT =  110

 DECIMAL =  111

 DIVIDE =  112

 F1 =  113

 F2 =  114

 F3 =  115

 F4 =  116

 F5 =  117

 F6 =  118

 F7 =  119

 F8 =  120

 F9 =  121

 F10 =  122

 F11 =  123

 F12 =  124

 F13 =  125

 F14 =  126

 F15 =  127

 F16 =  128

 NUMLOCK =  144