问题
("Click on owner-form" doesn't count. :))
I have:
public partial class Form1 : Form
{
Form2 frm2 = new Form2();
public Form1()
{
InitializeComponent();
frm2.Owner = this;
}
private void button1_Click(object sender, EventArgs e)
{
frm2.ShowDialog();
}
}
回答1:
Just change the owner setting from
frm2.Owner = this;
to
frm2.ShowDialog(this);
(Credit goes to gerald-p-wright)
来源:https://stackoverflow.com/questions/8704921/modal-form-doesnt-appear-in-tray-until-minimized-and-owner-form-is-clicked-once