If you've ever created a user control, particularly an inherited control, you've noticed that the icon to the left of your new control in the toolbox is simply a gear. With the below code, you can add the icon from an existing control:
or in C#VB Code:
<ToolboxBitmap(GetType(System.Windows.Forms.TextBox))> _ Public Class TextBox Inherits System.Windows.Forms.TextBox End Class
more information can be found HereVB Code:
[ToolboxBitmap(typeof(Button))] class MyControl1 : UserControl { }




Reply With Quote