Hi,
If the WindowsApplication1.Properties.Resources property was created for you
by VS 2005 then the following code should work for you (Note: you probably
don't need the global alias qualifier either so don't use it unless you're
absolutely sure it's necessary):
for (int c = 0; c < pictureBox.Count; c++)
{
this.pictureBox[c].Image =
(Image) Properties.Resources.ResourceManager.GetObject("_0 " + c);
}
BTW, you might want to choose a more descriptive naming convention than "_NN".
Try something like, "AnimalPictureNN", where NN is the number. I acknowledge
that might not be possible in your situation :)
--
Dave Sexton
"TheLostLeaf" <er**@canyondigital.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
Hello,
Im a c# noob,
How do I Change this:
this.pictureBox[c].Image =
global::WindowsApplication1.Properties.Resources._ 00;
this.pictureBox[c].Image =
global::WindowsApplication1.Properties.Resources._ 01;
this.pictureBox[c].Image =
global::WindowsApplication1.Properties.Resources._ 02;
To This
for (int c = 0; c < pictureBox.Count; c++)
{
this.pictureBox[c].Image =
global::WindowsApplication1.Properties.Resources._ 0+c;
}
Thanks Again !