|
-
July 15th, 2004, 08:40 AM
#1
Dealing with multiple forms
Hello all,
I'm trying to write an application in C#.NET (Visual Studio 2002), that deals with multiple windows, a bit like the wizards do, that is with a "Next" button etc.
I'd like to be able to close one form and show another one when clicking on a button. I tried calling Application.Run() without a Form nor ApplicationContext parameter, and calling Form.Show() for both forms sequentially.
I also tried creating my own ApplicationContext and changing the MainForm property in the Button_Clicked() event, or in the Form_Closed() one, and several different variations without success.
I can't find posts on this topic in the forum. I'd be grateful if someone could help me with this!
Thanks,
Maxime
-
July 15th, 2004, 10:22 AM
#2
You probably dont want to do what you want to do...
Keep it simple. Use a single form. Instanciate different controls for the different pages.
Much easier!
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|