Class TPGTrayIconMsgWindow (unit PGTray95)

Inherits from

TComponent

Constructors


constructor Create(AOwner: TComponent);

TPGTrayIconMsgWindow


Functions

destructor Destroy;

Initialize the timer that is used to determine whether or not } { OnMouseEnter and OnMouseExit mouse events have occurred.

procedure DoClickEventAsynchronously(AnInterval: TPGTimerInterval);

Starts a timer used to "delay" processing click and double click events } { inside the main message loop.

procedure DoneWaitingForDoubleClick(Sender: TObject);

Timer event that evaluates which mouse event has occurred, a single } { click, or a double click.

procedure StartTrackingMouseMovement(ptCursor: TPoint);

Fire's the OnMouseEnter event, and starts a timer that is used to } { eventually fire the OnMouseExit event.

procedure StartWaitingForDoubleClick;

Starts a timer used in checking if a double click has occurred.

procedure StopTrackingMouseMovement;

Fire OnMouseEnter event.

procedure TrackMouseMovement(Sender: TObject);

Checks to see if the cursor is still in the bounds of the TrayIcon.

procedure TrayIconCallback(var Message: TMessage);

This windows procedure is called by Windows whenever it has a message } { it wants to send to our component.

Properties

Events

Variables

AlreadyFiredMouseEnterEvent : Boolean;


ClickedMouseButton : TMouseButton;


DoubleClickHasOccurred : Boolean;


HitTrayIcon : Boolean;


MouseMoveTimer : TPGTimerItem;


ptMousePosition : TPoint;


TrayIcon : TPGTrayIcon95;


WaitForClickEventTimer : TPGTimerItem;



Constructors


constructor Create(AOwner: TComponent);

TPGTrayIconMsgWindow


Functions


destructor Destroy;

Initialize the timer that is used to determine whether or not } { OnMouseEnter and OnMouseExit mouse events have occurred.


procedure DoClickEventAsynchronously(AnInterval: TPGTimerInterval);

Starts a timer used to "delay" processing click and double click events } { inside the main message loop. This avoids the following OLE Automation } { Instantiation error: Error Code: RPC_E_CANTCALLOUT_ININPUTSYNCCALL - 'An } { outgoing call cannot be made since the application is dispatching an } { input-synchronous call'. More information on this topic can be found at } { the following URL: http://www.microsoft.com/kb/articles/q131/0/56.htm


procedure DoneWaitingForDoubleClick(Sender: TObject);

Timer event that evaluates which mouse event has occurred, a single } { click, or a double click. Once it has been determined, the appropriate } { event is fired.


procedure StartTrackingMouseMovement(ptCursor: TPoint);

Fire's the OnMouseEnter event, and starts a timer that is used to } { eventually fire the OnMouseExit event.


procedure StartWaitingForDoubleClick;

Starts a timer used in checking if a double click has occurred.


procedure StopTrackingMouseMovement;

Fire OnMouseEnter event.


procedure TrackMouseMovement(Sender: TObject);

Checks to see if the cursor is still in the bounds of the TrayIcon. If } { it isn't, then the OnMouseExit event is fired. This procedure is the } { OnTimer event for the MouseMoveTimer, and is enabled when the cursor } { enters the bounds of the TrayIcon.


procedure TrayIconCallback(var Message: TMessage);

This windows procedure is called by Windows whenever it has a message } { it wants to send to our component. The procedure is coded to } { capture mouse messages, and to interpret from the messages whether or } { not the user clicked, or double clicked the TrayIcon. } { Note: Whenever a mouse down message is received, the component starts a } { timer, and waits (the double click time in Windows) until it can } { determine if a single click or double click has occurred. Once } { it has been figured out, the appropriate event is fired.


Properties


Events


Variables


AlreadyFiredMouseEnterEvent : Boolean;


ClickedMouseButton : TMouseButton;


DoubleClickHasOccurred : Boolean;


HitTrayIcon : Boolean;


MouseMoveTimer : TPGTimerItem;


ptMousePosition : TPoint;


TrayIcon : TPGTrayIcon95;


WaitForClickEventTimer : TPGTimerItem;