Copyright: (C) Agni Software (P) Ltd


Welcome to Agni's Eye Spy

Welcome to Agni's Eye Spy. Agni's Eye Spy the one and only complete Spy for Delphi applications. Eye Spy is a tool using which the controls in a Delphi application can be spied on, for properties and events and messages.

Eye Spy is an aid, which helps in debugging and profiling Delphi applications. Eye Spy provides a Component finder, a Property Inspector, an Event watch and a Message Trap. To use Eye Spy in your application you just have to include one unit, and call one function to bring up Eye Spy. You can not only spy on the behaviour of visual controls but also on the behaviour of non-visual components like TTable, TTimer etc. Eye Spy also provides you with a message watch, which logs all window and control messages like WM_xxx, BM_xx, CM_xxx, etc. sent to the control.

Eye Spy features

Adding Eye Spy to an application

Working of Eye Spy

Eye Spy windows

For more information please visit http://www.agnisoft.com/hawkeye.htm#EyeSpy, or send us an email at hawkeye@agnisoft.com

Agni's Eye Spy is developed and marketed by

Agni Software (P) Ltd

#23, HareKrishna Road

Bangalore

INDIA

(C) Copyright 1998-99 Agni Software (P) Ltd


Eye Spy features

Primary among Eye Spy's features are,

•	Component Finder, to find components, both visual and non-visual

•	Property Inspector, which displays all the properties of the component

•	Multiple property inspector windows to allow spying on multiple components at the same time

•	Events watch, which provides visual feedback on the events and display the method handlers that are called when the event is triggered.

•	User can determine which events to watch

•	An event log.

•	Message Trap, which displays the window and control messages, which sent and returned from the control. The message is logged lParam and wParam shown in raw format, and also in interpreted format. Even logs user messages.

•	User can choose which messages the Message Trap catches.

•	Can also be used to Spy on Delphi itself.


Adding Eye Spy to an application

In order to add Eye Spy to an application follow the steps enumerated below,

•	Add the agnieyespy.dcu to either the project file or to your main form's unit. (Ensure that the path in which Eye Spy's files reside is included in your project's search path or the library path in the Environment Options dialog)

•	Call the function CreateEyeSpy to bring up Eye Spy's finder window

•	Before terminating the application call FreeEyeSpy.


CreateEyeSpy
procedure CreateEyeSpy;

Call the CreateEyeSpy procedure to create and show Agni's Eye Spy


FreeEyeSpy
procedure FreeEyeSpy;

Before terminating the application you need to call FreeEyeSpy to close down Agni's Eye Spy and free its resources.


Working of Eye Spy

Eye Spy is created by calling the CreateEyeSpy function, which lies in the agnieyespy.dcu unit. When a call to CreateEyeSpy is made, it brings up the Finder window. Using the finder tool in the Finder window, the user selects the control which is to be spied upon. Once a control is selected, press the Inspect button to view the properties and events inspector and the log. Press the Messages button to view the message trap. In the parent group, the name of the selected control's parent control is displayed. Click the Select button in the parent group inorder to make the parent control as the selected one. In the non-visual child control group, the combo box contains the name of all the non-visual child controls of the selected control. In order to select one of the child controls, select the child control in the combo box, and press the Select button.

Finding the control/component to spy on

Inspecting the properties and events

Inspecting the window and control messages

Selecting the parent control

Selecting non-visual child controls


Finding the control/component to spy  on

To find a component on any form, position the mouse on the image of pointing hand, and depress the left mouse button. While keeping the mouse button depressed, move the mouse onto the component/control/form you want to spy upon. As you are moving the mouse you will notice that the control on which the mouse resides is highlighted around the border, and also details on the control are displayed in the Finder window. Once the mouse is on top the control you want to spy on, release the left mouse button.

Working of Eye Spy


Inspecting the properties and events

After the control which is to be spied upon is selected using the finder, click on the Inspect button. The Inspect button brings up a property and event inspector, and also a log window. The Property tab of the Inspector, displays all the properties and the corresponding values. Values can of the properties can be modified. The Event tab display all the event names, and the names of the handlers which have been assigned to them.

In order to refresh the properties click on the Refresh button. To set Refresh options for the inspector, click on the Options button.

As events are fired, the corresponding row of the Event inspector flashes, and an entry is made in the event log. To prevent the watch of an event, uncheck the checkbox next to the event name.

Working of Eye Spy


Inspecting the window and control messages

After the control which is to be spied upon is selected using the finder, click on the Messages button. The Message button brings the Message Trap for the selected control. The Message Trap, traps all window and control messages sent to the control, and displays the message and its parameters in the Message Trap window. The Message Trap window displays the message name, lParam and wParam of the message as raw data, and also the interpreted values of the wParam and lParam.

Working of Eye Spy


Selecting the parent control

After the control which is to be spied upon is selected using the finder, if the control has a parent control then the name of the parent control is displayed in the parent group box. In order to select the parent control, click on the Select button which is in the parent group box.

Working of Eye Spy


Selecting non-visual child controls

After the control which is to be spied upon is selected using the finder, if the control has non-visual child components (like TTable etc), they are listed in the combo box which lies in the Non-visual child components group box. In order to select a particular child component, select the child in the combo box, and click on the Select button

Working of Eye Spy


Eye Spy's Windows

Eye Spy has 4 windows.

The Finder

The Property & Event Inspector

The Log window

The Message Trap


The Finder

Eye Spy's Windows


The Property & Event Inspector

Eye Spy's Windows


The Log window

Eye Spy's Windows


The Message Trap

Message Trap options

Eye Spy's Windows


Message Trap Options

Message Trap

Eye Spy's Windows


Finder Tool
Use the finder tool to find controls/components/forms.


Window Handle
Displays the window handle of the control selected. If the control is not a windowed control, then the text (Not a Window) is displayed.


Caption
Displays the caption of the control selected. If the control is a Delphi component which has the Caption property, then the value of the Caption property is displayed, else the window text is displayed.


Class
This displays the Class name of the control selected.


VCL Class
This displays the VCL class name of the selected control


Bounds
Displays the bounds rect of the control selected. If a non-visual component is selected then a set of empty braces is displayed


Parent Group
This group displays the selected control's parent control's name. Clicking on the Select button, makes the parent control as the currently selected control. If the selected control doesnt have a parent control then the Select button is disabled.


Child Group
The Child group displays a list of all the non-visual components of the select control in the combo box. Click on the Select button selects the selected child in the combo box. If the selected control has no non-visual child components then the combo box and the Select button are disabled.


Inspect
Clicking on this button brings up the property and event inspector for the selected control


Messages
Clicking on this button brings up the Message Trap for the selected control. If the selected control is not a windowed control then this button is disabled


Message List
Shows a list of all messages belonging to all the various groups. Highlight the messages which are to be trapped.


Message Groups
Check the messages which you want to trap.


Check All
Checks all the message groups


UnCheck All
Unchecks all the message groups


Pause
This is a toggle button which toggles between Pause and Play states. When the button is depressed then the Message Trap is paused and messages are trapped.


Clear
Click on this button to clear the messages in the Message Trap


Options
Click on this button to set Message Trap options


Message View
The Message View displays the messages trapped in the Message Trap. Message entries are of two types. When a message is sent to the control, then the entry is prefixed with a S. When the message returns from the control, another message entry is made prefixed with a R. The Message column displays the message name, the wParam and lParam columns display the raw values of the wParam and lParam members of the message. The data column contains the interpreted values of wParam and lParam.


Component Name
Displays the component name and the component's class name, of which the properties and events are being viewed.


Event Names
Lists the names of all the events of the current component


Event Values
Lists the name of the handler for the corresponding event name. If there is no handler present for that event, then the handler name is left blank


Refresh Button
Click on this button to refresh the property values.


Auto Refresh Check
If this check box is checked then the property values are refreshed once in the interval specified.


Auto Refresh Interval
This is the interval in which if the Auto Refresh check box is checked, the property values are refreshed


Property Names
Lists the names of all the properties of the current component


Property Values
Lists the values of the corresponding property names.


About Eye Spy
Brings up the about box.


Log View
Displays the log of all the events fired. The log can be cleared and saved by right clicking on the view, and selecting the appropriate choice in the popup menu.