Method Close
Close()
Closes the window.
void Close()
Remarks
When a window is closed, all resources created within the object are closed and the
window is disposed.
You can prevent the closing of a window at run time by handling the
Closing event and
setting the Cancel
property of the CancelEventArgs passed as
a parameter to your event handler.
If the window you are closing is the last open window of your application,
your application ends.
The window is not disposed on Close() when you have displayed the
window using ShowModal().
In this case, you will need to call Dispose() manually.