Click here to Skip to main content
15,917,059 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can we convert string to Brush ? Pin
Bert delaVega1-Jul-08 18:23
Bert delaVega1-Jul-08 18:23 
AnswerRe: How can we convert string to Brush ? Pin
Bert delaVega1-Jul-08 18:43
Bert delaVega1-Jul-08 18:43 
QuestionHow to place Assemblies or DLL's in a subfolder Pin
earlgraham1-Jul-08 10:41
earlgraham1-Jul-08 10:41 
AnswerRe: How to place Assemblies or DLL's in a subfolder Pin
Pete O'Hanlon1-Jul-08 11:03
mvePete O'Hanlon1-Jul-08 11:03 
AnswerRe: How to place Assemblies or DLL's in a subfolder Pin
earlgraham8-Jul-08 11:35
earlgraham8-Jul-08 11:35 
Questionaccessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 9:19
Sajjad Izadi1-Jul-08 9:19 
AnswerRe: accessing objects in form by index or somthing like index Pin
Pete O'Hanlon1-Jul-08 9:44
mvePete O'Hanlon1-Jul-08 9:44 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 9:52
Sajjad Izadi1-Jul-08 9:52 
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 10:31
User 66581-Jul-08 10:31 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 10:37
Sajjad Izadi1-Jul-08 10:37 
AnswerRe: accessing objects in form by index or somthing like index Pin
luisnike191-Jul-08 9:59
luisnike191-Jul-08 9:59 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 10:41
Sajjad Izadi1-Jul-08 10:41 
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 10:47
User 66581-Jul-08 10:47 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 11:11
Sajjad Izadi1-Jul-08 11:11 
i can solve my problem now but it is not optimized though Big Grin | :-D :

i named my pictureboxes as: picturebox1, picturebox2, ... and picturebox16. now i want them in a list. i wrote the followings:

PictureBox pic;
for (int i = 1; i < 16; i++)
{
    foreach (Control cont in this.Controls)
    {
         if (cont is PictureBox)
         {
               pic = cont as PictureBox;
               if (pic.Name.EndsWith(i.ToString()))
                      images.Add(pic);
         }
    }
}

it works Smile | :) but do you suggest any thing more optimized? D'Oh! | :doh:

thanks
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 11:17
User 66581-Jul-08 11:17 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 11:29
Sajjad Izadi1-Jul-08 11:29 
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 11:35
User 66581-Jul-08 11:35 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 11:42
Sajjad Izadi1-Jul-08 11:42 
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 11:46
User 66581-Jul-08 11:46 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 11:53
Sajjad Izadi1-Jul-08 11:53 
GeneralRe: accessing objects in form by index or somthing like index [MODIFIED!] Pin
User 66581-Jul-08 12:03
User 66581-Jul-08 12:03 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 12:05
Sajjad Izadi1-Jul-08 12:05 
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 12:08
User 66581-Jul-08 12:08 
GeneralRe: accessing objects in form by index or somthing like index Pin
Sajjad Izadi1-Jul-08 12:11
Sajjad Izadi1-Jul-08 12:11 
GeneralRe: accessing objects in form by index or somthing like index Pin
User 66581-Jul-08 12:13
User 66581-Jul-08 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.