Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching Between Windows Forms

Status
Not open for further replies.

karateboy02

Programmer
Jul 26, 2007
12
US

In my program I launch a windows form from another windows form. The flow breakdown is as follows.

User starts program (a windows form).
User clicks on button and launches a second windows form.

After the second form is launched I cannot go back to the first form unless I close the second one. Does anyone know how I can keep both forms open and switch between the two of them freely?

Thanks in advance.
 
Make it modeless. Google for modeless dialogs. Tons of hits.

Depends on how you are creating it and whether you are using MFC or SDK. Basically brew your own OnOK and OnCancel. Use Create instead of DoModal. There are quite a few websites that describe every detail.
 
I figured it out. I was using ShowDialog() to open the new forms when I should have been using Show(). ShowDialog() is for more like ok box type calls so that you can't go back to the original screen without an acknowledgement of some sort. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top