Custom Control and icon in toolbox

  • Thread starter Thread starter Maileen
  • Start date Start date
M

Maileen

Hi,

I've created my customer control from a ListView.
Now, i would like to allocate it a bitmap in order to see it in my
ToolBox bar.

For this i use :

<ToolboxBitmap(GetType(ARSortListView), "tbxARSortListView.bmp")> _
Public Class ARSortListView
Inherits System.Windows.Forms.ListView
....
End Class

Where tbxARSortListView.bmp is the name of my image and ARSortListView
the name of my class.

my bitmap is a 16x16 pixels side and in 256 colors...
unfortunately for me this bitmap doesn't appear in my Toolbox. Instead
of tmy bitmap i have the standard icon of new customer control...

why ?

thanks a lot,
Maileen
 
1. The project should include tbxARSortListView.bmp
2. Set Build Action of tbxARSortListView.bmp to Embedded Resource.
 
Back
Top