Frm

 

Description

Returns a reference to a specific form created with the NewForm method.

The reference can be used to access the form's properties and methods

Syntax

[Set oFrm =] oDlg.Frm ( [ Name ] )

Parameters

Part

Description

Set oFrm =

(optional) Store a reference to the new form in the variable oFrm. This variable can be used to access the form's properties and methods

oDlg

A reference to the WshDialog.Kit automation object (as returned by the
Wscript or VBScript CreateObject methods)

Name

(optional) The unique name of the form. Defaults to "", if omitted.
The names "*" and "FrmDialog" are reserved and cannot be used

Properties and Methods

See the NewForm method for a list of available properties and method

Example

Option Explicit

Dim oDlg, oSample

'Create the WshDialog.Kit object and store a reference in oDlg
Set oDlg = Wscript.CreateObject("WshDialog.Kit", "oDlg_")

'Add a new form and store a reference to it in the variable oSample
Set oSample = oDlg.NewForm("Sample")

'Modify some properties of the form using the reference variable
oSample.Caption = "This is a sample WshDialog form"
oSample.Taskbar = True
oSample.AutoSize


'Now do the same using the Frm function
oDlg.Frm("Sample").Caption = "This is a sample WshDialog form"
oDlg.Frm("Sample").Taskbar = True
oDlg.
Frm("Sample").AutoSize

'Show the form (modal)
oDlg.Frm("Sample").Show 1