Click here to Skip to main content
15,897,371 members
Articles / Web Development / ASP.NET

How to create MDI Application in Compact framework

Rate me:
Please Sign up or sign in to vote.
3.09/5 (8 votes)
15 Apr 20063 min read 50.1K   673   19  
It provides easy solution dealing multiple forms in .Net Compact framework
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MultipleDocments_Demo
{
    public partial class mainscreen : Form
    {
        MotherClass mc;
        public mainscreen(MotherClass mcTemp)
        {
            InitializeComponent();
            mc = mcTemp;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (mc.f1 == null)
            {
                mc.f1 = new Form1(this.mc);
            }
            mc.f1.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (mc.f2 == null)
            {
                mc.f2 = new Form2(this.mc);
            }
            mc.f2.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (mc.f3 == null)
            {
                mc.f3 = new Form3(this.mc);
            }
            mc.f3.Show();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
India India
I am a .Net CF developer.I am passionate about coding,sketching,blogging, travelling.One can read my blogs @ www.those39hrs.blogspot.com
I wish all the best to CF Developer community for the future challenges.

Comments and Discussions