How to Access Internal Properties and Methods of Run-Time .NET Windows Forms Objects

Object property can be used to retrieve internal properties and activate internal methods of any .NET Windows Forms object in your application.

For example, you can set the focus to a particular button and change its caption using statements similar to the following:

Set theButton = SwfWindow(“frmWin”).SwfButton(“OK”).Object


theButton.Caption = “Yes”

The Object property is also useful for verifying the value of properties that are not available using a standard checkpoint.

When you use the Object property to retrieve arrays of structures, the Object property returns the COM wrapper of the system.array object. In your VBScript test or component steps, you can then use the system.array object to access the array members.

For example, suppose a button object in your application has a PointArray property, which is an array of Point structures. To access the first item in the PointArray property, you would use the following expression:


If the same object had an IntArray property, which was an array of integers, you would use the following expression to access the first item in the IntArray property:


Rahnuma Tasnim

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top