我素新手哈请问 怎么能在第一个窗口上点击进入下一个窗口???就是2个窗口之间怎么实现连接???
解决方案 »
- 新手请教个菜单问题
- 请问Excel导入数据的问题
- 谁有关与pos机编程的资料?帮忙给提供几个连接。
- C#在读取XML时,怎样区别注释行呢?
- 如何判断当前应用程序是WebApplication还是普通的Application。
- 请问2003版datagrid的SetDataBinding在2005dataGridView1中该用什么属性?
- 各位高手:我是一个菜鸟, 请问能用C#编写视频聊天的功能吗? 怎么做
- Winform 小闹钟怎么做?
- 急,,,,怎么样在js中判断FCKeditor的值是否为空????
- 我有C/C++基础,请推荐几本C#的书!
- 文件流读取文本,没有读制表符(\t),如何才能读取到\t ?
- 请问这句Access查询语句
调用Show()方法。
Form2 form2 = new Form2();
form2.Show();
form2.Show();是写到Form2里面还是Form里面 又些到哪里啊?
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());
} }
}
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();
}
}
}
string LoginName= this.LoginName.Text
NewWin Nw= new NewWin ();
Nw.Show();//望采纳 嘿嘿!
NewWin Nw= new NewWin ();
Nw.Show();
//这样就可以 NewWin 是你要跳转的窗口的名字