Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to globally connect all the forms in single "Windows Form Applicaton".........
Posted
Comments
Dave Kreskowiak 29-Dec-10 23:53pm    
What do you mean by "connect"?? What are you looking to do?
thatraja 30-Dec-10 1:40am    
clear your question

Depends on what you are doing.

One way could be to have public properties that can be accessed by other forms if you have instances of those forms available.

Another way could be to have a common controller class that generates all forms - this way this form is aware of all instances of forms created.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Dec-10 2:05am    
Essential correction: in the case you explain, not "public" but "internal". "public" will not hurt, but internal is strict.
Also, I'm not sure the inquirer can understand your answer (not your fault -- I'll vote "5"). If the question was about how to separate UI from logic, it would go in right direction. If someone has not enough fantasy to "connect" the form, the advice will be used for creation of useless mess. Well, I would be happy is someone proves me wrong...
Hi You can use master page controls
 
Share this answer
 
Comments
Sandeep Mewara 30-Dec-10 0:31am    
He said... 'Windows Forms Application'.
Master pages are for Web...
Use Masterpage Control to connect all the forms.
 
Share this answer
 
Comments
Sandeep Mewara 30-Dec-10 0:32am    
He said... 'Windows Forms Application'. Master pages are for Web..
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-Dec-10 2:09am    
MDI adds nothing the the resolution of the problem. Just a misleading answer. What's the difference from the standpoint of cross-form accessibility? Not at all.

Besides, MDE is very inconvenient, that's why almost no UI uses it, no quality UI anyway.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900