Did you say you put that in the main form's constructor?
The Form.Load or Form.Shown event might be better...
Try this with your code instead of Application.Exit in the Load or Shown event.
this.Close(); // if the form has not been shown
The application will exit normally if you simply close the main form.
The form that is started by this line.
Application.Run(new MainForm());
Rudedog =8^D
Mark the best replies as answers. "Fooling computers since 1971."