Component icons!

  • Thread starter Thread starter Atmapuri Makovsek via .NET 247
  • Start date Start date
A

Atmapuri Makovsek via .NET 247

Hi!

How can I define the icon for my custom component
in VS2003? (to appear on the toolbar)

Thanks!
 
Atmapuri Makovsek via .NET 247 said:
How can I define the icon for my custom component
in VS2003? (to appear on the toolbar)

Create a bitmap of size 16 × 16 and 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
 
In addition to Herfrieds advice you might like to check out the article in
Windows Forms Tips and Tricks on the subject.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Back
Top