Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / January 2005

Tip: Looking for answers? Try searching our database.

ToolboxBitmap  in a Resource File

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adam Dockter - 13 Jan 2005 15:15 GMT
I want my custom controls to have customer bitmaps but I can't get them to
work if I try to pull the icon from a resource file.

I know that I can add the icon to the project as an embedded resource then
put the attribute.
[ToolboxBitmap(typeof(MyControl),"MyIcon.ico")]

That works fine.  But I would really like to put the icon in a resource file
MyControl.resx then use it as the icon.  Has anyone ever gotten this to
work.  Or has anyone figured out how to compile .ico files as embedded
resources using Nant?

Any help is appreciated.

-Adam dR.
joeycalisay - 14 Jan 2005 03:45 GMT
http://www.bobpowell.net/toolboxbitmap.htm

> I want my custom controls to have customer bitmaps but I can't get them to
> work if I try to pull the icon from a resource file.
[quoted text clipped - 11 lines]
>
> -Adam dR.
MailInterface - 15 Jan 2005 05:58 GMT
I use embedded resource (an Bmp File) as icon at tool box item.i just
added teh file in visualstudio,put it as embedded resource and  put
[ToolboxBitmap(typeof(MyControl),"MyIcon.ico")] on my control.it just
works fine.
Adam Dockter - 17 Jan 2005 14:18 GMT
I have gotten this to work as well, however my companies release build is
done with nant and the only thing I have been able to get nant to compile
for resources are *.resx files.  So I am trying to pull the bitmap from one
of those but doesn't seem to be working.

> I use embedded resource (an Bmp File) as icon at tool box item.i just
> added teh file in visualstudio,put it as embedded resource and  put
> [ToolboxBitmap(typeof(MyControl),"MyIcon.ico")] on my control.it just
> works fine.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.