How to make a multiple form in windows application

Posted on 2006-05-30
Medium Priority
Last Modified: 2010-04-16
I want to make a form in a windows application. The form could show different pages, which just like we install some software, we push "next" turns to show next page and push "back" we come back. Besides, I don't want MDI to use sub forms to realize this.
Question by:ed_dalian
LVL 44

Accepted Solution

bruintje earned 300 total points
ID: 16788483
Hi ed_dalian,

you could start with the sample build in this article

the sourcecode is on this page below the wizard screenshot

share what you know, learn what you don't
LVL 20

Assisted Solution

TheAvenger earned 300 total points
ID: 16788524
So you basicly need a wizard control. Here is one implementation which is relatively good:


Assisted Solution

aaronfeng earned 300 total points
ID: 16789132
Hi Ed,

You can actually create this type of control really easy.  For example, if you have Form that has a panel and two buttons, one button is next and other is back.  The panel will be the region you want to show the next "view" when the user clicks on the next button.  Each "view" will be a UserControl, when the user clicks on the next button it will add the UserControl to the Panel.  

Something like this:


In your Form you'll have to keep track which UserControl should be loaded, this can be done with just an index in the form.  What I talked about here is all in simple terms, of course you want to follow good design when you create this control.



Assisted Solution

MyersA earned 300 total points
ID: 16790418
Hi ed_dalian,

Another way of doing this would be with a Windows Form and a Tab Control.  If, for example, your installer has two steps, then the TabControl would have two tab pages. When th Form loads, you would see tabPage1. tabPage1 would have a button that would look something like this:

private void button1_Click(object sender, System.EventArgs e)
                //Validation code - pass or fail
                if (Validation code)  //it passed
                      this.tabControl1.SelectedTab = tabPage2;  //move to next Tabpage

Finally, so that the user doesn't see the Tabs, just position the TabControl so that the tabPages are "under" the title bar at the top of the Form.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question