public void bt_Click(Object sender, EventArgs e)
    {
        SampleForm sf = new SampleForm();

        //sf.ShowDialog();
        sf.Show();
    }
Esempio n. 2
0
    public Form1()
    {
        //InitializeComponent();
        this.Text           = "Form1";
        this.IsMdiContainer = true;
        var f1 = new SampleForm()
        {
            Text = "Some Form", MdiParent = this
        };

        f1.NonClientMouseHover += child_NonClientMouseHover;
        f1.Show();
        var f2 = new SampleForm()
        {
            Text = "Some Other Form", MdiParent = this
        };

        f2.NonClientMouseHover += child_NonClientMouseHover;
        f2.Show();
    }