我素新手哈请问  怎么能在第一个窗口上点击进入下一个窗口???就是2个窗口之间怎么实现连接???

解决方案 »

  1.   

    实例化第二个窗体。
    调用Show()方法。
    Form2 form2 = new Form2();
    form2.Show();
      

  2.   

    2楼正解。新手汉化2楼。。嘿嘿。汉化的不好。。千万不要扔砖。。第二个窗口名称  实例化名称(随便起,但最好有意义) = new 第二个窗口名称();实例化名称(必须和上面的实例化名称一样) . Show();(调用窗口方法)
      

  3.   

    那  那个Form2 form2 = new Form2();
    form2.Show();是写到Form2里面还是Form里面     又些到哪里啊?
      

  4.   

    两种方式,show  or  showdialog ,showdialog有返回值
      

  5.   

    当我运行的时候,为毛第一个窗口出来咯点击确定就进入不到第二个窗口了??
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Windows.Forms;namespace 学生管理系统
    {
        static class Program
        {        /// <summary>
            /// 应用程序的主入口点。
            /// </summary>
            [STAThread]
            static void Main()
            {
                //Form2 frm = new Form2();
                //if (frm.ShowDialog() == DialogResult.OK)
                //{
                //    frm.Close();
                //    Application.Run(new Form1());
                //}            Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }    }
    }
      

  6.   

    第一个窗口的
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;namespace 学生管理系统
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            private void button2_Click(object sender, EventArgs e)
            {
                DialogResult = DialogResult.Cancel;
                this.Close();
            }        private void button1_Click(object sender, EventArgs e)
            {
                DialogResult = DialogResult.OK;
                this.Close();
            }
        }
    }
      

  7.   

    http://www.cnblogs.com/virusswb/articles/1206897.html先抓基础。
      

  8.   


    string LoginName= this.LoginName.Text
    NewWin Nw= new NewWin ();
    Nw.Show();//望采纳 嘿嘿!
      

  9.   


    NewWin Nw= new NewWin ();
    Nw.Show();
    //这样就可以 NewWin 是你要跳转的窗口的名字