.NET Windows Forms Spy Dialog Box

This dialog box enables you to select a specific control in your .NET application, view its run-time object properties and values, change property values in the application in run-time, listen to events on a specific control, view the event arguments, and fire events back at the application.

To access

Select Tools > .NET Windows Forms Spy.

Relevant tasks
See also

User interface elements are described below:

UI Elements

Description

Enables you to select a .NET Windows Forms object on which to spy. You can spy on as many objects within a single .NET application as you want. Each object that you select is added to the Objects pane.

  • If you select an object from a different .NET application, an additional UFT .NET Windows Forms Spy window opens, showing the information for the selected object.
  • UFT must be open if you want to use the pointing hand mechanism to spy on additional objects.
Type

Displays the full type name of the selected object.

Objects pane

Displays a hierarchical tree of the objects you selected to spy.

The Objects pane contains a list of the objects in your .NET application on which you have spied. Each time you spy on another object in the same .NET application, it is added to the Objects pane. You can spy on as many objects from the same .NET application as you want, using the pointing hand button in the UFT .NET Windows Forms Spy window.

The Objects pane also contains any embedded objects that you added from the Properties tab. Each time you add an embedded object to the Objects pane, it is added below its parent object, in a hierarchical format. You can select an object in the Objects pane and view or modify its properties and property values, and listen to and fire its events.

Properties tab

Enables you to view and modify values of run-time object properties in your .NET application. The Properties tab enables you to view run-time object properties and values for objects in your .NET application. You can select a property to display a description of the property below the property grid.

You can choose to display the properties alphabetically or by category. You can change property values in the .NET Windows Forms Spy and apply those changes to your .NET application in run-time.

Events tab

Enables you to listen to events in your .NET application and fire them at the application.

The Events tab enables you to listen to selected events on a specific control in your .NET application. You can then view the event arguments, and fire selected events back at the application.

This is especially useful if you are using .NET Add-in Extensibility to create support for custom .NET Windows Forms controls. You can see which events cause your .NET application to change, so you can implement extensibility for recording operations on specific controls, and also check which events need to be fired to make your .NET application behave the way you want.

Status bar

Displays the class name of the object that is selected in the Objects pane, and the event handling status.