Custom Control and icon in toolbox

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
 
G

Guest

1. The project should include tbxARSortListView.bmp
2. Set Build Action of tbxARSortListView.bmp to Embedded Resource.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top