Where should I place my images?

G

Guest

Hi!
I'm an experienced asp.net developer, but I need to create a quick windows
application.
One of the things I'm having trouble with is figuring out where to place
some image files. I have a picturebox, and I intend to randomly place an
image in there. The only thing is, when I build the application, it looks for
the file in bin\images\.
Is this the best place to put the images folder?
Will that path work when I go to deploy the application?
Whats the best practice for grabbing files in a windows application (rather
it be an image, xml file, or whatever...)
Thanks for the help!

-- Casey
 
B

Bob Powell [MVP]

If the images are small(ish) and used often put them into the solution as an
embedded resource and retrieve them using
Image.FromStream(GetType().Assembly.GetManifestResourceStream(<your
resource>))

--
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.
 

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

Top