Configure Windows Applications Options
Source code
'************************************************************************************************************************
'Description:
'
'This example opens UFT and configures its Windows application options.
'
'Assumptions:
'UFT is not open.
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtOptions 'As QuickTest.WindowsAppsOptions ' Declare the Windows Applications Options object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start UFT
qtApp.Visible = True ' Make the UFT application visible

Set qtOptions = qtApp.Options.WindowsApps ' Return the Windows Applications Options object

' Configure the Windows Applications options
qtOptions.AttachedTextArea = "BottomLeft" ' Set the point from which to search for attached text
qtOptions.AttachedTextRadius = 50 ' Set the maximum distance for searching attached text
qtOptions.ExpandMenuToRetrieveProperties = True ' Set to open menu objects before retrieving properties during run
qtOptions.NonUniqueListItemRecordMode = "ByIndex" ' When more than one list/tree item has same name, set to record its index
qtOptions.RecordOwnerDrawnButtonAs = "CheckBoxes" ' Set to identify/record custom buttons as check boxes
qtOptions.ForceEnumChildWindows = True ' Enumerate all child windows when recording and running a test.
qtOptions.ClickEditBeforeSetText = True ' Perform a click operation to set the focus in an edit box before inserting text in it.
qtOptions.VerifyMenuInitEvent = False ' Ignore menu initialization events before recording operations on menu controls.

Set qtOptions = Nothing ' Release the Windows Applications Options object
Set qtApp = Nothing ' Release the Application object