form2传值给form1form2中
private void button_Click(object sender, EventArgs e)
{
Form1 frm = new Form1 (false, currentID);
frm.ShowDialog();
}form1中
bool modType;
int currentNo; public Form1(bool mType, int cNo)
{
InitializeComponent();
modType = mType;
currentNo = cNo;
} private void Form1_Load(object sender, EventArgs e)
{
textbox1.text=modType.toString();
}
private void button_Click(object sender, EventArgs e)
{
Form1 frm = new Form1 (false, currentID);
frm.ShowDialog();
}form1中
bool modType;
int currentNo; public Form1(bool mType, int cNo)
{
InitializeComponent();
modType = mType;
currentNo = cNo;
} private void Form1_Load(object sender, EventArgs e)
{
textbox1.text=modType.toString();
}
Form2用到弹出Form1窗体可以。。而没有Frm.Show()的话就没反应
http://topic.csdn.net/u/20080318/09/48a7fa8e-3500-4a0c-9617-39c5a0247c8f.html