All Forums
 Microsoft Windows CE
 .NET Application Development
 c# embedded resource graphics
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

mhuman1

36 Posts

Posted - 15 Mar 2004 :  13:33:22  Show Profile  Email Poster
I have several embedded resource gif files that I want to choose from to load into a picturebox control at run time.

Using a c# "pictureBox1.Image=" type statement, what code so I use??

Thanks,
Keith Stallings

ctacke

877 Posts

Posted - 15 Mar 2004 :  13:47:33  Show Profile  Email Poster
Something like this:


Bitmap bmp = new Bitmap(
   Assembly.GetExecutingAssembly().GetManifestResourceStream("MyNamespace.MyImage.bmp"));


The ManifestResource name *is* case sensitive and the Namespace *is* required.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000