Table of contents
TOC
折叠目录
展开目录

AddControl 事件AddControl Event

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

当一个控件插入到框架中或多页控件的窗体时发生。语法对于框架专用子对象_(AddControl)的多页专用子对象_AddControl (索引作为长ctrl作为控件)AddControl事件语法具有下列组成部分:Occurs when a control is inserted onto a form, a Frame, or a Page of a MultiPage. Syntax For Frame Private SubobjectAddControl( ) For MultiPage Private Sub_objectAddControl(_indexAs Long, ctrlAs Control) The AddControl event syntax has these parts:

部件Part说明Description
objectobject(所需)。对象有效。Required. A valid object.
索引index必填。页面将包含新控件的索引。Required. The index of the Page that will contain the new control.
ctrl 键ctrl必需。要添加的控件。Required. The control to be added.

备注AddControl 事件发生时在运行时添加控件。在设计时中添加控件,也不被启动时最初加载并在运行时显示窗体时,则不会启动此事件。此事件的默认操作是将一个控件添加到指定的窗体,多页Add方法将启动 AddControl 事件。Remarks The AddControl event occurs when a control is added at run time. This event is not initiated when you add a control at design time, nor is it initiated when a form is initially loaded and displayed at run time. The default action of this event is to add a control to the specified form, Frame, or MultiPage. The Add method initiates the AddControl event.

© 2018 Microsoft