ToolboxComponentsCreatingEventArgs Class
Provides data for the ComponentsCreating event that occurs when components are added to the toolbox.
For a list of all members of this type, see ToolboxComponentsCreatingEventArgs Members.
System.Object
System.EventArgs
System.Drawing.Design.ToolboxComponentsCreatingEventArgs
[Visual Basic] Public Class ToolboxComponentsCreatingEventArgs Inherits EventArgs [C#] public class ToolboxComponentsCreatingEventArgs : EventArgs [C++] public __gc class ToolboxComponentsCreatingEventArgs : public EventArgs [JScript] public class ToolboxComponentsCreatingEventArgs extends EventArgs
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Remarks
The ComponentsCreating event is raised when components are about to be added to the toolbox. ToolboxComponentsCreatingEventArgs provides data indicating the designer that has requested that the components be added.
Example
[Visual Basic, C#, C++] The following example method returns a System.Drawing.Design.ToolboxComponentCreatingEventArgs that indicates the designer host that is about to receive a new component or set of components:
[Visual Basic] Public Function CreateToolboxComponentsCreatingEventArgs(ByVal host As System.ComponentModel.Design.IDesignerHost) As ToolboxComponentsCreatingEventArgs Dim e As New ToolboxComponentsCreatingEventArgs(host) ' The designer host of the document receiving the components e.DesignerHost Return e End Function [C#] public ToolboxComponentsCreatingEventArgs CreateToolboxComponentsCreatingEventArgs(System.ComponentModel.Design.IDesignerHost host) { ToolboxComponentsCreatingEventArgs e = new ToolboxComponentsCreatingEventArgs(host); // The designer host of the document receiving the components e.DesignerHost return e; } [C++] public: ToolboxComponentsCreatingEventArgs* CreateToolboxComponentsCreatingEventArgs(System::ComponentModel::Design::IDesignerHost* host) { ToolboxComponentsCreatingEventArgs* e = new ToolboxComponentsCreatingEventArgs(host); // The designer host of the document receiving the components e.DesignerHost return e; }
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Namespace: System.Drawing.Design
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: System.Drawing (in System.Drawing.dll)
See Also
ToolboxComponentsCreatingEventArgs Members | System.Drawing.Design Namespace | ToolboxComponentsCreatingEventHandler