Click here to Skip to main content
15,926,274 members
Home / Discussions / C#
   

C#

 
GeneralRe: TreeView Expansion Question Pin
Neil Van Note23-Apr-02 9:41
Neil Van Note23-Apr-02 9:41 
GeneralRe: TreeView Expansion Question Pin
Sabran23-Apr-02 9:50
Sabran23-Apr-02 9:50 
GeneralRe: TreeView Expansion Question Pin
Sabran23-Apr-02 10:51
Sabran23-Apr-02 10:51 
GeneralRe: TreeView Expansion Question Pin
Neil Van Note23-Apr-02 17:43
Neil Van Note23-Apr-02 17:43 
GeneralRe: TreeView Expansion Question Pin
Sabran27-Apr-02 0:18
Sabran27-Apr-02 0:18 
GeneralRe: TreeView Expansion Question Pin
Neil Van Note27-Apr-02 8:42
Neil Van Note27-Apr-02 8:42 
QuestionControls across forms? Pin
Brian Olej23-Apr-02 7:19
Brian Olej23-Apr-02 7:19 
AnswerRe: Controls across forms? Pin
James T. Johnson23-Apr-02 8:31
James T. Johnson23-Apr-02 8:31 
brian1415 wrote:
Im proud to say I am now part of the community.

Welcome Smile | :)

I can think of a couple different options, both require the child forms to be aware of the parent. The first one is the best though and I'll explain how to do it.

The first has the child forms knowing only about itself and the parent. When data needs to be exchanged it tells the Parent form to do it.

The second requires the child forms to know about the parent and the other child windows. This can make maintenance a nightmare but opens the door up a bit for what you want to do.

Assume the parent form is of type ParentForm. Then to get a reference to the parent from the child you would do ParentForm p = this.Parent as ParentForm.

Now that you have a reference to the ParentForm you can call methods on it... When you want to pass data around you tell the parent to pass the data by calling a method on it. That method tells the other child window what to do. The ParentForm is aware of all child windows.

Difficult for me to explain in English, but pretty easy to do in code Smile | :)

James

Simplicity Rules!
GeneralRe: Controls across forms? Pin
Brian Olej23-Apr-02 9:27
Brian Olej23-Apr-02 9:27 
GeneralRe: Controls across forms? Pin
James T. Johnson24-Apr-02 2:10
James T. Johnson24-Apr-02 2:10 
GeneralRe: Controls across forms? Pin
Brian Olej24-Apr-02 2:31
Brian Olej24-Apr-02 2:31 
GeneralHit Test Pin
23-Apr-02 6:47
suss23-Apr-02 6:47 
GeneralRe: Hit Test Pin
Nick Parker23-Apr-02 8:00
protectorNick Parker23-Apr-02 8:00 
GeneralRe: Hit Test Pin
Neil Van Note23-Apr-02 8:04
Neil Van Note23-Apr-02 8:04 
GeneralRe: GetChildAtPoint *ADVANCED!* Pin
23-Apr-02 9:36
suss23-Apr-02 9:36 
GeneralRe: GetChildAtPoint *ADVANCED!* Pin
Neil Van Note23-Apr-02 10:10
Neil Van Note23-Apr-02 10:10 
GeneralRe: GetChildAtPoint *ADVANCED!* Pin
Neil Van Note23-Apr-02 18:29
Neil Van Note23-Apr-02 18:29 
GeneralA deeper explaination Pin
23-Apr-02 9:49
suss23-Apr-02 9:49 
GeneralConectionStringIII Pin
Mazdak23-Apr-02 5:03
Mazdak23-Apr-02 5:03 
GeneralRe: ConectionStringIII Pin
Neil Van Note23-Apr-02 8:31
Neil Van Note23-Apr-02 8:31 
GeneralRe: ConectionStringIII Pin
Neil Van Note23-Apr-02 8:39
Neil Van Note23-Apr-02 8:39 
GeneralRe: ConectionStringIII Pin
Mazdak23-Apr-02 19:12
Mazdak23-Apr-02 19:12 
GeneralRe: ConectionStringIII Pin
Neil Van Note23-Apr-02 19:20
Neil Van Note23-Apr-02 19:20 
GeneralSystem.Net.dll does not exist! Pin
23-Apr-02 3:58
suss23-Apr-02 3:58 
GeneralRe: System.Net.dll does not exist! Pin
Gavin_Mannion23-Apr-02 4:10
Gavin_Mannion23-Apr-02 4:10 

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.