ToolboxItem.OnComponentsCreating(ToolboxComponentsCreatingEventArgs) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
引发 ComponentsCreating 事件。
protected:
virtual void OnComponentsCreating(System::Drawing::Design::ToolboxComponentsCreatingEventArgs ^ args);
protected virtual void OnComponentsCreating(System.Drawing.Design.ToolboxComponentsCreatingEventArgs args);
abstract member OnComponentsCreating : System.Drawing.Design.ToolboxComponentsCreatingEventArgs -> unit
override this.OnComponentsCreating : System.Drawing.Design.ToolboxComponentsCreatingEventArgs -> unit
Protected Overridable Sub OnComponentsCreating (args As ToolboxComponentsCreatingEventArgs)
参数
为事件提供数据的 A ToolboxComponentsCreatingEventArgs 。
注解
该方法 OnComponentsCreating 引发 ComponentsCreating 事件。 在调用工具箱项以创建组件之后调用此方法,就在调用该方法之前 CreateComponentsCore 。
引发事件会通过委托调用事件处理程序。 有关详细信息,请参阅 处理和引发事件。
该方法 OnComponentsCreating 还允许派生类在不附加委托的情况下处理事件。 这是处理派生类中的事件的首选技术。
继承者说明
在派生类中重写 OnComponentsCreating(ToolboxComponentsCreatingEventArgs) 时,请务必调用基类 OnComponentsCreating(ToolboxComponentsCreatingEventArgs) 的方法,以便已注册的委托接收事件。