就像Sticky Notes
中的Windows 7
一样,我想创建一个mainForm
,只要用户点击Button
说btnAdd
,就会添加一个新表单。此新表单应具有mainForm
的所有属性。
我试过了:
private void btnAdd_Click (object sender, EventArgs e)
{
mainForm newForm=new mainForm();
newForm.show();
}
但即使这是创建类似于mainForm
的表单,我们会在关闭mainForm
时关闭。
答案 0 :(得分:1)
我认为这就是你要找的......
已复制:
private void button1_Click(object sender, EventArgs e)
{
Process p = new Process();
p.StartInfo.FileName = Application.ExecutablePath;
p.Start();
}