Click here to Skip to main content
16,004,050 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If I open a new form from the first form, I can no longer use the first form until I close the new one. I need two forms enabled at the same time and need to communicate with each other. Any hints would be helpful. Thanks.
Posted

Use the .Show method when you are showing the new form instead of .ShowDialog.
Just note that you need to ensure that you create a new instance of the form before you show it.
 
Share this answer
 
v2
Comments
fcronin 19-May-11 15:56pm    
5 for good answer... just would add for communicating between the forms, the form that is created and Shown will need a reference to the form that created it. I generally would send a reference to the originating form in the new form's constructor... but there are many ways to go about it.
Sergey Alexandrovich Kryukov 19-May-11 16:31pm    
Agree, a 5. Please see also my recommendation in my solution.
--SA
See also my answer on form collaboration (also other answers and discussion):
How to copy all the items between listboxes in two forms[^].

I would advice to use just one main form and minimum modal forms. Use some tabbed UI, docking UI or some other combination using just one form.

See also the set of my recommendations here:
GUI Apperance - C#.Net[^].

—SA
 
Share this answer
 

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



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