Adding icon on user control

E

Ellis Yu

Hi all,

I'd tried to follow the instructions from msdn for adding icon image
for a control. I've checked the name of bmp file is same as the control name
and turn the bmp file to "Embedded Resource". After building the project
again, the icon of my user control is the same as default. I'm not sure it's
related to my VB.Net version is a standard edition or not. Anyone know
what's wrong my steps? Thanks

Rdgs
Ellis
 
H

Herfried K. Wagner [MVP]

Ellis Yu said:
I'd tried to follow the instructions from msdn for adding icon image
for a control. I've checked the name of bmp file is same as the control
name
and turn the bmp file to "Embedded Resource". After building the project
again, the icon of my user control is the same as default. I'm not sure
it's
related to my VB.Net version is a standard edition or not. Anyone know
what's wrong my steps?

Create a 16 x 16 pixd give it the name of the class ('Class BlaBla' ->
"BlaBla.bmp"). Then you can add the bitmap to the project and set its build
action to embedded resource. Extend your code like this:

\\\
<ToolboxBitmap(GetType(BlaBla))>
Public Class BlaBla
 

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

Similar Threads


Top