Best way to create an ImageCollection?

G

Guest

Hi,
Visual C# applications often include data that is not source code. Such data
is referred to as a project resource and it can include binary data, text
files, audio or video files, string tables, icons, images, XML files, or any
other type of data that your application requires. Project resource data is
stored in XML format in the .resx file (named Resources.resx by default)
which can be opened in Solution Explorer.
Project resource allows you, for example, to store image files embedded
into RESX files without you need to deploy those files on production servers
For more details refer below links:
http://msdn2.microsoft.com/en-us/library/7k989cfy(VS.80).aspx
http://www.neodynamic.com/ND/FaqsTipsTricks.aspx?tabid=66&prodid=0&sid=53
Hope this helps
 
L

Linda Liu [MSFT]

Hi Dave,

I think you could put the images in the Resources.resx under the Properties
folder. You can get the images from the resources and put them into an
image array for later use.

To do this, follow the steps below:

1. Double-click the Resources.resx under the Properties folder in the
Solution Explorer.

2. Add the images you want as resources into the Resources.resx file.

3. Write code to get the images from the resources and build an image
array. The following is a sample, which requires to add a Button on a form:
private void button1_Click(object sender, EventArgs e)
{
Image[] imageArray = new Image[2];
imageArray[0] =Properties.Resources.Image1;
imageArray[1] = Properties.Resources.Image2;
}

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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