ShowDialog() doesn't bring form to top when the owner is minimized. It is shown and visible, but it is not focused and behind the current window. Even using the commented lines, I see the issue.
public void Form1_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
// this.Hide();
using (var f = new Form1())
{
// this.WindowState = FormWindowState.Normal;
f.Text = "ShowDialog()";
f.Click -= new EventHandler(f.Form1_Click);
f.ShowDialog(this); // f is not on top?
this.Show();
}
}