change little picture in a custom control

Weidberg

New member
Joined
Jun 7, 2009
Messages
2
Programming Experience
3-5
hello!

I wanted to know how can I change the little picture when creating a new custom control. I mean the picture that appear in the toolbox when adding the control to the list of the controls.

thanks :)
 
Straight from MSDN:
VB.NET:
' Visual Basic
' Specifies the bitmap associated with the Button type.
<ToolboxBitmap(GetType(Button))> Class MyControl1
' Specifies a bitmap file.
End Class
<ToolboxBitmap("C:\Documents and Settings\Joe\MyPics\myImage.bmp")> _
   Class MyControl2
End Class
' Specifies a type that indicates the assembly to search, and the name 
' of an image resource to look for.
<ToolboxBitmap(GetType(MyControl), "MyControlBitmap")> Class MyControl
End Class
 
Back
Top