Click here to Skip to main content
15,892,697 members
Home / Discussions / C#
   

C#

 
QuestionSerial Communication (Loopback) Pin
Cadence2.027-Jun-06 12:48
Cadence2.027-Jun-06 12:48 
AnswerRe: Serial Communication (Loopback) Pin
led mike27-Jun-06 20:38
led mike27-Jun-06 20:38 
GeneralRe: Serial Communication (Loopback) Pin
Cadence2.028-Jun-06 5:39
Cadence2.028-Jun-06 5:39 
AnswerRe: Serial Communication (Loopback) Pin
Cadence2.028-Jun-06 6:24
Cadence2.028-Jun-06 6:24 
GeneralRe: Serial Communication (Loopback) Pin
led mike28-Jun-06 7:44
led mike28-Jun-06 7:44 
QuestionResolve UNC Names Pin
HahnTech27-Jun-06 12:13
HahnTech27-Jun-06 12:13 
AnswerRe: Resolve UNC Names Pin
Mike Poz27-Jun-06 14:12
Mike Poz27-Jun-06 14:12 
GeneralRe: Resolve UNC Names Pin
HahnTech27-Jun-06 18:44
HahnTech27-Jun-06 18:44 
GeneralRe: Resolve UNC Names Pin
Mike Poz28-Jun-06 8:13
Mike Poz28-Jun-06 8:13 
GeneralRe: Resolve UNC Names Pin
HahnTech28-Jun-06 8:30
HahnTech28-Jun-06 8:30 
QuestionInheritance Pin
Besinci27-Jun-06 11:24
Besinci27-Jun-06 11:24 
AnswerRe: Inheritance Pin
Wjousts27-Jun-06 11:31
Wjousts27-Jun-06 11:31 
GeneralRe: Inheritance Pin
Judah Gabriel Himango27-Jun-06 13:05
sponsorJudah Gabriel Himango27-Jun-06 13:05 
AnswerRe: Inheritance Pin
Elina Blank27-Jun-06 11:34
sitebuilderElina Blank27-Jun-06 11:34 
QuestionRe: Inheritance Pin
BoneSoft27-Jun-06 12:38
BoneSoft27-Jun-06 12:38 
Questionforms Pin
Mohammed Elkholy27-Jun-06 11:20
Mohammed Elkholy27-Jun-06 11:20 
AnswerRe: forms Pin
Jun Du27-Jun-06 13:36
Jun Du27-Jun-06 13:36 
QuestionHelp please: Naming the objects at runtime! Pin
Rojan Gh.27-Jun-06 11:17
professionalRojan Gh.27-Jun-06 11:17 
Hi everyone!
I've got a problem, coding in C#!
I have to create some PictureBox controls at runtime and the number of these will be specified at runtime too. Next, I should be able to target them by the name.
I mean I have to be able to generate the names as I need, at runtime, something like this:

<br />
for(int x = 0; x < xCount; x++){<br />
   for(int y = 0; y <yCount; y++){<br />
      public PictureBox "PictureBoxX"+x.ToString()+Y+Y.ToString() = new PictureBox();<br />
   }<br />
}<br />


and then I should be able to access the control by its name and also be able to assign its properties!

There is a function in Javascript and Actionscript that make the object accesible at runtime by generating its name:

<br />
piece3 = "dangerous";<br />
x = 3; <br />
y = eval("piece" add x);<br />
trace(y);        // Output: dangerous.<br />


or

<br />
name1 = "mike";<br />
name2 = "debbie";<br />
name3 = "logan";<br />
for(i = 1; i <= 3; i++) {<br />
    trace (eval("name" add i));        // Output: mike, debbie, logan<br />


but I couldn't find such a thing in C#!

Please help me with this!Frown | :( ((Sigh | :sigh:

Sojaner!
AnswerRe: Help please: Naming the objects at runtime! [modified] Pin
Wjousts27-Jun-06 11:28
Wjousts27-Jun-06 11:28 
AnswerRe: Help please: Naming the objects at runtime! Pin
Rojan Gh.28-Jun-06 2:35
professionalRojan Gh.28-Jun-06 2:35 
AnswerRe: Help please: Naming the objects at runtime! Pin
Guffa27-Jun-06 13:28
Guffa27-Jun-06 13:28 
AnswerRe: Help please: Naming the objects at runtime! Pin
Rojan Gh.28-Jun-06 2:48
professionalRojan Gh.28-Jun-06 2:48 
AnswerRe: Help please: Naming the objects at runtime! Pin
Guffa28-Jun-06 9:40
Guffa28-Jun-06 9:40 
AnswerRe: Help please: Naming the objects at runtime! [modified] Pin
Rojan Gh.28-Jun-06 12:08
professionalRojan Gh.28-Jun-06 12:08 
AnswerRe: Help please: Naming the objects at runtime! Pin
Guffa28-Jun-06 20:14
Guffa28-Jun-06 20:14 

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.