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 :)
 

newguy

Well-known member
Joined
Jun 30, 2008
Messages
611
Location
Denver Co, USA
Programming Experience
1-3
Straight from MSDN:
Code:
' 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
 
Top Bottom