Skip to content

ICustomForm 接口 ​

ICustomControl 的窗体类对应接口。自定义窗体类——承载其他自定义控件的顶级窗口——实现此接口。形状与 ICustomControl 相同,只是 Initialize 回调接收 CustomFormContext(它扩展了 CustomControlContext 的 Show 和 Close)而非普通的 CustomControlContext。

WaynesForm——包中唯一的具体窗体类——实际上实现了 ICustomControl 并在内部将上下文转换为 CustomFormContext——ICustomForm 接口的发布是为了与 ICustomControl 对等,但目前没有被包中任何类使用。

方法 ​

Destroy ​

窗体被释放时调用一次。参见 ICustomControl.Destroy。

语法:object.Destroy ( )

Initialize ​

在框架构建窗体并将设计器设置的属性值反序列化到其中后调用一次。

语法:object.Initialize ( Context )

Context
必需 此窗体实例的 CustomFormContext。

Paint ​

每次框架需要重绘窗体客户区域时调用。参见 ICustomControl.Paint。

语法:object.Paint ( Canvas )

Canvas
必需 此绘制过程的 Canvas 绘图表面。

twinBASIC及其LOGO版权为作者"韦恩"所有