Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.79 KB

File metadata and controls

42 lines (28 loc) · 1.79 KB
title CustomFormContext
parent Framework
grand_parent CustomControls Package
permalink /tB/Packages/CustomControls/Framework/CustomFormContext
has_toc false

CustomFormContext class

{: .no_toc }

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 includes every member from CustomControlContext --- ChangeFocusedElement, CreateTimer, GetSerializer, and Repaint --- and adds the two form-specific members below.

Methods

Close

{: .no_toc }

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

{: .no_toc }

Shows the underlying window. Application code typically calls WaynesForm.Show, which in turn calls into this method.

Syntax: object.Show ( )