Check the project properties... on the Applications tab... there's an option for Shutdown mode ... it should be when the main form closes, or when all forms are closed, which ever is more...