Click here to Skip to main content
15,903,030 members
Home / Discussions / C#
   

C#

 
Question[Message Deleted] Pin
Yathish hatter9-Sep-08 4:29
Yathish hatter9-Sep-08 4:29 
AnswerRe: please Help me C# Pin
Anthony Mushrow9-Sep-08 4:33
professionalAnthony Mushrow9-Sep-08 4:33 
AnswerRe: please Help me C# [modified] Pin
BillW339-Sep-08 5:32
professionalBillW339-Sep-08 5:32 
AnswerRe: please Help me C# Pin
zafersavas9-Sep-08 5:58
zafersavas9-Sep-08 5:58 
GeneralRe: please Help me C# Pin
DaveyM699-Sep-08 7:10
professionalDaveyM699-Sep-08 7:10 
GeneralRe: please Help me C# Pin
zafersavas9-Sep-08 8:31
zafersavas9-Sep-08 8:31 
GeneralRe: please Help me C# Pin
DaveyM699-Sep-08 8:53
professionalDaveyM699-Sep-08 8:53 
GeneralRe: please Help me C# Pin
zafersavas9-Sep-08 10:00
zafersavas9-Sep-08 10:00 
Well, this topic seems going deeper Smile | :)
DaveyM69 wrote:
what if you have multiple objects that need to know that form2 is closing? You'd need to pass every object in the constructor. How can you predetermine how many there will be or what types?

absolutely no, no and no, have a look at this:
Form1 : is the main form, Form2 and Form3 are declared here.<br />
Form2(Form1 frmRef);<br />
Form3(Form1 frmRef);

2 knows 1, 1 knows 3 so 2 can know 3 through 1.

Just pass Form1 as a constructor parameter and dont think the rest. As every form is aware of Form1 and Form1 is where other forms are declared, this means "everybody knows everybody". Form1 is something like a common node for all others. So as you see you dont have to pass other forms to the constructor.

Anyway, its a way up to you. No problem if it is efficient and causing any trouble.
Kind regards
zafer
GeneralRe: please Help me C# Pin
DaveyM699-Sep-08 10:27
professionalDaveyM699-Sep-08 10:27 
GeneralRe: please Help me C# Pin
Mycroft Holmes9-Sep-08 15:46
professionalMycroft Holmes9-Sep-08 15:46 
GeneralRe: please Help me C# Pin
DaveyM699-Sep-08 23:07
professionalDaveyM699-Sep-08 23:07 
AnswerRe: please Help me C# Pin
nelsonpaixao9-Sep-08 14:11
nelsonpaixao9-Sep-08 14:11 
Questionis there any body in all the world can help me Pin
Miss_hacker9-Sep-08 3:42
Miss_hacker9-Sep-08 3:42 
AnswerRe: is there any body in all the world can help me Pin
Pete O'Hanlon9-Sep-08 4:06
mvePete O'Hanlon9-Sep-08 4:06 
AnswerRe: is there any body in all the world can help me Pin
J4amieC9-Sep-08 4:07
J4amieC9-Sep-08 4:07 
GeneralRe: is there any body in all the world can help me Pin
Pete O'Hanlon9-Sep-08 4:29
mvePete O'Hanlon9-Sep-08 4:29 
GeneralRe: is there any body in all the world can help me Pin
Paul Conrad9-Sep-08 6:43
professionalPaul Conrad9-Sep-08 6:43 
QuestionSet the light/siren device on in C# Pin
khuzwayom9-Sep-08 2:33
khuzwayom9-Sep-08 2:33 
AnswerRe: Set the light/siren device on in C# Pin
Pete O'Hanlon9-Sep-08 2:37
mvePete O'Hanlon9-Sep-08 2:37 
AnswerRe: Set the light/siren device on in C# Pin
zafersavas9-Sep-08 5:34
zafersavas9-Sep-08 5:34 
AnswerRe: Set the light/siren device on in C# Pin
Thomas Stockwell9-Sep-08 8:45
professionalThomas Stockwell9-Sep-08 8:45 
JokeRe: Set the light/siren device on in C# Pin
DaveyM699-Sep-08 9:14
professionalDaveyM699-Sep-08 9:14 
JokeRe: Set the light/siren device on in C# Pin
Mycroft Holmes9-Sep-08 16:05
professionalMycroft Holmes9-Sep-08 16:05 
AnswerRe: Set the light/siren device on in C# Pin
leppie9-Sep-08 21:50
leppie9-Sep-08 21:50 
GeneralRe: Set the light/siren device on in C# Pin
khuzwayom9-Sep-08 22:19
khuzwayom9-Sep-08 22:19 

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.