_CustomFormContext interface
The underlying COM interface for CustomFormContext, extending _CustomControlContext with Show and Close — the two operations a top-level custom form needs that an embedded control does not.
User code works with CustomFormContext directly; this interface page documents the method contract that the CoClass exposes.
Inherited
Every member of _CustomControlContext is also present on _CustomFormContext — GetSerializer, Repaint, CreateTimer, and ChangeFocusedElement.
Methods
Show
Makes the underlying window visible.
Syntax: object.Show ( )
The method maps to the Win32 show-window operation on the form’s HWND. Application code typically calls WaynesForm.Show, which in turn calls this method through the stored CustomFormContext reference.
A custom form class casts the CustomControlContext it receives in ICustomForm.Initialize to CustomFormContext and stores it; it then exposes its own Show method that delegates here:
Private m_Context As CustomControls.CustomFormContext
Private Sub OnInitialize(ByVal Ctx As CustomControls.CustomFormContext) _
Implements CustomControls.ICustomForm.Initialize
Set m_Context = Ctx
End Sub
Public Sub Show()
m_Context.Show
End Sub
Close
Closes the underlying window. Equivalent to the user clicking the title-bar close button.
Syntax: object.Close ( )
Application code typically calls WaynesForm.Close, which in turn calls this method through the stored CustomFormContext reference.
See Also
- CustomFormContext class
- _CustomControlContext interface
- ICustomForm interface
- CustomControlContext class