Table of Contents

Class UserControlClasses

Namespace
RDCore.Forms.Model
Assembly
RDCore.Forms.dll

The classes of the controls a project's UserControls place on its forms.

public static class UserControlClasses
Inheritance
UserControlClasses
Inherited Members

Remarks

A placed UserControl's members are those of the extender VB6 wraps it in, and the extender's surface depends on the UserControl's settings, as measured with VB6:

SettingMembers of a placed control
Every placed controlLeft and Top.
InvisibleAtRuntime FalseWidth, Height, Visible, DragMode, ToolTipText, WhatsThisHelpID and Tag, and RD-VBA's Opacity.
InvisibleAtRuntime TrueNothing else: a program can read neither Left nor Top, and the control has no extent.
CanGetFocus True or ForwardFocus True, and visibleTabIndex.
CanGetFocus True, ForwardFocus False, and visibleTabStop, CausesValidation, HelpContextID, SetFocus, and the GotFocus and LostFocus events.
DefaultCancel TrueDefault and Cancel.
Alignable TrueAlign and Negotiate.

A placed control has no Enabled, hWnd or data-binding member, whatever the settings.

Methods

DefinitionOf(ComponentClass)

The UserControl a class of placed controls was made from by Of(FormDefinition, string, IReadOnlyList<EventDefinition>?).

public static FormDefinition? DefinitionOf(ComponentClass placed)

Parameters

placed ComponentClass

The class.

Returns

FormDefinition

The UserControl's definition, or null for a class Of(FormDefinition, string, IReadOnlyList<EventDefinition>?) did not make.

Exceptions

ArgumentNullException

placed is null.

Of(FormDefinition, string, IReadOnlyList<EventDefinition>?)

The class of the controls userControl places: Project1.UserControl1 for UserControl1 of Project1, with the extender members its settings give it. It is a container when the UserControl's ControlContainer is True, and windowless when its Windowless is.

public static ComponentClass Of(FormDefinition userControl, string projectName, IReadOnlyList<EventDefinition>? events = null)

Parameters

userControl FormDefinition

The UserControl, as its designer file defines it.

projectName string

The name of the project the UserControl is in.

events IReadOnlyList<EventDefinition>

The events the UserControl's code declares, which a placed control raises; none when null.

Returns

ComponentClass

The class, which has no default member and no method but SetFocus.

Exceptions

ArgumentNullException

userControl or projectName is null.

ArgumentException

userControl's root is not a UserControl; projectName is empty or white space; or two of events, or one of them and GotFocus or LostFocus of a control that has them, share a name.