Table of Contents

Class FormObject

Namespace
RDCore.SDK.Workspace.Forms
Assembly
RDCore.SDK.dll

What VBA makes of a UserForm besides the Microsoft Forms UserForm it hosts: the members and the events of the form object, which a form's class has as well as its controls (DeclaredControls()) and the members of its own code.

public static class FormObject
Inheritance
FormObject
Inherited Members

Remarks

UserForm1.Show, Me.Hide, UserForm1.Left and the Initialize, QueryClose, Terminate events are VBA's, not Microsoft Forms': FM20.DLL's UserForm declares none of them, and no type library on disk does (VBE7.DLL's describes the VBA standard library). The form's class is not extensible (UserForm1.ShowModal is "Method or data member not found"), so each member here is one MS-VBA compiles, measured in Excel (oracle\s32b, s32c): what it is (a method, or a property MS-VBA reads and, for some, assigns), and what its arguments are. The types of the properties are what TypeName answers of them; the parameters of Show and Move, whose types MS-VBA coerces to, are Variant.

The events are those the VBA reference documents for a UserForm, which handlers named UserForm_EventName handle, whatever the form's name.

The description is a library's (LibraryDescription), read as one is (LibrarySymbolReader), so that its members are symbols like any library class's: the designer declares them on the form's class (IsDeclaredBy(Symbol)), and a call of one is dispatched outside the workspace's code, by its ExternalTarget, to whatever hosts the form.

Fields

ClassName

The name of the form object's class in it, and the prefix of the handlers of its events (UserForm_Initialize).

public const string ClassName = "UserForm"

Field Value

string

LibraryName

The name of the pseudo-library the form object's members are read from: the first part of their ExternalTarget.

public const string LibraryName = "UserForms"

Field Value

string

Properties

Description

The form object, as a library of one class.

public static LibraryDescription Description { get; }

Property Value

LibraryDescription

Methods

ClassIn(Uri)

The form object's class, read as a library's (LibrarySymbolReader), with its members and its events.

public static VBClassModuleSymbol ClassIn(Uri workspaceRoot)

Parameters

workspaceRoot Uri

The root of the workspace the symbols are of.

Returns

VBClassModuleSymbol

IsDeclaredBy(Symbol)

Whether a member of a class is one its form's designer declares, rather than its code: a control, or a member of the form object or of the Microsoft Forms UserForm - which is what makes the class a form's.

public static bool IsDeclaredBy(Symbol member)

Parameters

member Symbol

A member of a class module.

Returns

bool

IsFormClass(VBClassModuleSymbol)

Whether a class module is a form's: one whose designer declares members of it (IsDeclaredBy(Symbol)). Its lifecycle is a UserForm's - its UserForm_Initialize and UserForm_Terminate run, not a class module's Class_Initialize and Class_Terminate (Excel-measured, oracle\s41 L50) - and it is what Load and Unload load and unload.

public static bool IsFormClass(VBClassModuleSymbol classModule)

Parameters

classModule VBClassModuleSymbol

The class module.

Returns

bool

TargetOf(string, string, string)

The ExternalTarget of a member a form's designer declares on its class: UserForms.FormName.Member/kind, which a host of the form dispatches; nothing does before one is part of the platform, and a call of it is then a run-time error, not a missing procedure.

public static string TargetOf(string form, string member, string kind)

Parameters

form string

The name of the form.

member string

The name of the member: a control, or a member of the form object or of the Microsoft Forms UserForm.

kind string

What it is: method, get, let or set.

Returns

string