| Class TWatch (unit Watch) |
TComponent
| Constructors |
constructor Create(AOwner:TComponent);| Functions |
destructor Destroy;
procedure getKeyInfo(lParam:Integer; var KeyInfo:TKeyInfo);
function getVKString(keyCode:Integer):String;
procedure OnHWNDEvent(var Message: TMessage);
procedure ReleaseLib;
procedure SetDLLReceiver(r:Integer);
function GetAppName(window:THandle):String;
procedure OnKeyHook(wParam,lParam: Longint);
procedure OnShellHook(nCode: Integer; wParam: Longint);
procedure LoadLib;
procedure ResetLibVars;
procedure SetOnActivateShellWindow(h:TShellEvent);
procedure SetOnKeyNative(h:TKeyNativeEvent);
procedure SetOnWindowActivated(h:TShellEvent);
procedure SetOnWindowCreated(h:TShellEvent);
procedure SetOnWindowDestroyed(h:TShellEvent);
procedure StartStop(start:Boolean; WatchType:TWatchType);
procedure UnLoadLib;| Properties |
property NotifyOwnEvents : Boolean
property RepeatedEvents : Boolean| Events |
event OnActivateShellWindow : TShellEvent
event OnKeyNative : TKeyNativeEvent
event OnWindowActivated : TShellEvent
event OnWindowCreated : TShellEvent
event OnWindowDestroyed : TShellEvent| Variables |
DontLoadLib : Boolean;
FNotifyOwnEvents : Boolean;
FOnActivateShellWindow : TShellEvent;
FOnKeyNative : TKeyNativeEvent;
FOnWindowActivated : TShellEvent;
FOnWindowCreated : TShellEvent;
FOnWindowDestroyed : TShellEvent;
FRepeatedEvents : Boolean;
HWNDHandle : THandle;
KEY_EVENT : Integer;
LastActivated : String;
LibHandle : THandle;
SetReceiver : TSetReceiver;
SHELL_EVENT : Integer;
StartWatching : TWatching;
StillWatching : TStillWatching;
StopAll : TStopAll;
StopWatching : TWatching;| Constructors |
constructor Create(AOwner:TComponent);| Functions |
destructor Destroy;get unique Message IDs for the Broadcast of the dll
procedure getKeyInfo(lParam:Integer; var KeyInfo:TKeyInfo);
function getVKString(keyCode:Integer):String;
procedure OnHWNDEvent(var Message: TMessage);This is the function to which the events of the dll are posted
procedure ReleaseLib;
procedure SetDLLReceiver(r:Integer);
function GetAppName(window:THandle):String;
procedure OnKeyHook(wParam,lParam: Longint);
procedure OnShellHook(nCode: Integer; wParam: Longint);extra variable for clean conversion of PChar to String
procedure LoadLib;
procedure ResetLibVars;
procedure SetOnActivateShellWindow(h:TShellEvent);--------------- Shell Properties ---------------
procedure SetOnKeyNative(h:TKeyNativeEvent);--------------- Keyboard Properties ---------------
procedure SetOnWindowActivated(h:TShellEvent);
procedure SetOnWindowCreated(h:TShellEvent);
procedure SetOnWindowDestroyed(h:TShellEvent);
procedure StartStop(start:Boolean; WatchType:TWatchType);generic procedure that handles starting and stopping of the hooks
procedure UnLoadLib;Create the window for notifications of the dll
| Properties |
property NotifyOwnEvents : Boolean
property RepeatedEvents : Boolean| Events |
event OnActivateShellWindow : TShellEvent
event OnKeyNative : TKeyNativeEvent
event OnWindowActivated : TShellEvent
event OnWindowCreated : TShellEvent
event OnWindowDestroyed : TShellEvent| Variables |
DontLoadLib : Boolean;
FNotifyOwnEvents : Boolean;----- SHELL EVENTS ------
FOnActivateShellWindow : TShellEvent;
FOnKeyNative : TKeyNativeEvent;Window still lives when this call comes {----- KEY EVENTS --------
FOnWindowActivated : TShellEvent;
FOnWindowCreated : TShellEvent;
FOnWindowDestroyed : TShellEvent;
FRepeatedEvents : Boolean;
HWNDHandle : THandle;invisible window that receives messages from the dll
KEY_EVENT : Integer;
LastActivated : String;
LibHandle : THandle;handle of the library
SetReceiver : TSetReceiver;
SHELL_EVENT : Integer;message IDs for events of the dll
StartWatching : TWatching;procedures in the DLL
StillWatching : TStillWatching;
StopAll : TStopAll;
StopWatching : TWatching;