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:
| Setting | Members of a placed control |
|---|---|
| Every placed control | Left and Top. |
InvisibleAtRuntime False | Width, Height, Visible, DragMode, ToolTipText, WhatsThisHelpID and Tag, and RD-VBA's
Opacity. |
InvisibleAtRuntime True | Nothing else: a program can read neither Left nor Top, and the control has no extent. |
CanGetFocus True or ForwardFocus True, and visible | TabIndex. |
CanGetFocus True, ForwardFocus False, and visible | TabStop, CausesValidation, HelpContextID, SetFocus, and the GotFocus and LostFocus events. |
DefaultCancel True | Default and Cancel. |
Alignable True | Align 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
placedComponentClassThe class.
Returns
- FormDefinition
The UserControl's definition, or null for a class Of(FormDefinition, string, IReadOnlyList<EventDefinition>?) did not make.
Exceptions
- ArgumentNullException
placedis 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
userControlFormDefinitionThe UserControl, as its designer file defines it.
projectNamestringThe name of the project the UserControl is in.
eventsIReadOnlyList<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
userControlorprojectNameis null.- ArgumentException
userControl's root is not a UserControl;projectNameis empty or white space; or two ofevents, or one of them andGotFocusorLostFocusof a control that has them, share a name.