How to make a multiple form in windows application

Posted on 2006-05-30
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

    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

    So you basicly need a wizard control. Here is one implementation which is relatively good:
    LVL 5

    Assisted Solution

    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.


    LVL 2

    Assisted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now