I agree with John, it seems poorly structured.
However, that being said, it worked fine for me:
private void Form1_Load(object sender, System.EventArgs e)
{
Console.WriteLine("Form Load");
MessageBox.Show("Hi");
this.Close();
}
A better solution:
Add a method to your Form called:
public bool ShouldShow()
And use that before calling Show().
Or you could try using the VisibleChanged event. Unfortunately, in an
example I ran, the VisibleChanged event fires after the Load event
Finally, you could declare a new Show() method that either display a
message box or else calls base.Show(). Note, however, that Show is
not declared virtual, so Application.Run(myForm) will not call your
method polymorphically.
mike