CustomFormContext class
The form-class counterpart to CustomControlContext. Extends the base context with Show and Close — the operations a top-level form needs that an embedded control does not.
WaynesForm receives its context as a CustomControlContext (because it implements ICustomControl) and casts it to CustomFormContext internally so that it can call Show from its own Show method and Close from its Close method.
Private Sub OnInitialize(ByVal Ctx As CustomControls.CustomControlContext) _
Implements CustomControls.ICustomControl.Initialize
Set Me.ControlContext = CType(Of CustomFormContext)(Ctx)
End Sub
Inherited
A CustomFormContext carries every member from CustomControlContext — ChangeFocusedElement, CreateTimer, GetSerializer, and Repaint — and adds the two form-specific members below.
Methods
Close
Closes the underlying window. Equivalent to the user clicking the title-bar close button. Application code typically calls WaynesForm.Close, which in turn calls into this method.
Syntax: object.Close ( )
Show
Shows the underlying window. Application code typically calls WaynesForm.Show, which in turn calls into this method.
Syntax: object.Show ( )