Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
Questionhow can i draw a rectangle from a separate antoher winForm? Pin
maifs9-Sep-08 5:23
maifs9-Sep-08 5:23 
AnswerRe: how can i draw a rectangle from a separate antoher winForm? Pin
zafersavas9-Sep-08 5:49
zafersavas9-Sep-08 5:49 
AnswerRe: how can i draw a rectangle from a separate antoher winForm? Pin
DaveyM699-Sep-08 6:59
professionalDaveyM699-Sep-08 6:59 
QuestionValidating event in a Dialog form Pin
Gareth H9-Sep-08 5:21
Gareth H9-Sep-08 5:21 
AnswerRe: Validating event in a Dialog form Pin
Wendelius9-Sep-08 7:25
mentorWendelius9-Sep-08 7:25 
GeneralRe: Validating event in a Dialog form Pin
Gareth H9-Sep-08 22:28
Gareth H9-Sep-08 22:28 
GeneralRe: Validating event in a Dialog form Pin
Wendelius10-Sep-08 8:02
mentorWendelius10-Sep-08 8:02 
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 

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.