Disposes of the resources (other than memory) used by the System.Windows.Forms.Form.
This method is called by the public Dispose method and the object.Finalize method. Dispose invokes the protected Dispose(Boolean) method with the disposing parameter set to true. object.Finalize invokes Dispose with disposing set to false.
When the disposing parameter is true, this method releases all resources held by any managed objects that this System.Windows.Forms.Form references. This method invokes the Dispose method of each referenced object.
Form.Dispose(bool) will be called automatically if the form is shown using the erload:System.Windows.Forms.Form.Show method. If another method such as erload:System.Windows.Forms.Form.ShowDialog is used, or the form is never shown at all, you must call Form.Dispose(bool) yourself within your application.