AI智能
改变未来

C#:button界面跳转

//Program.csstatic void Main(){Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Form1 Register = new Form1();Register.ShowDialog();if (Register.DialogResult == DialogResult.OK){Register.Dispose();Application.Run(new Form2()); //跳转form2}else if (Register.DialogResult == DialogResult.Cancel){Register.Dispose();return;}
//Form1.csprivate void button1_Click(object sender, EventArgs e){MessageBox.Show(\"Collecting successed!\"); //消息框this.DialogResult = DialogResult.OK; //界面跳转this.Dispose();this.Close();}
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » C#:button界面跳转