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 / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

ToolboxBitmap and resources

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J-L - 27 Mar 2008 10:45 GMT
Hi,

I have created a new control and I need to pt it in the toolbox.
Actually, I have added a bitmap in ma solution and I code:

   [ToolboxBitmap(typeof(OKButton), "button_ok.bmp")]
   public class OKButton : Button

But, is it possible to use a bitmap in a .resx resources file ?

If yes, I don't find the syntax code.

Thanks for your help.

Jean-Luc (France)
Marc Gravell - 27 Mar 2008 11:06 GMT
Not as a resx AFAIK - but you can just mark the image file as an "Embedded
Resource" in the solution explorer, and use the name (in the way that you
are). The Type (typeof(OKButton) is used to get the resourcemanager - so the
image should be in the same project as IOKButon.

Marc
Marc Gravell - 27 Mar 2008 11:09 GMT
Note also that it (the image) often won't show in the toolbox when working
on the same project - only when working on a /separate/ project that
references it as binary.

Marc
J-L - 27 Mar 2008 11:26 GMT
Thanks a lot Marc ... always helpful :-)

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.