Method wnd.Close
Overload
Closes the window.
public bool Close(bool noWait = false, bool useXButton = false)
Parameters
noWait (bool)
If |
useXButton (bool)
If |
Returns
bool
|
Remarks
The window may refuse to be closed. For example, it may be hung, or hide itself instead, or display a "Save?" message box, or is a dialog without X button, or just need more time to close it.
If the window is of this thread, just calls wnd.Send or wnd.Post (if noWait==true
) and returns true
.
Examples
//close all Notepad windows
foreach (var w in wnd.findAll("* Notepad", "Notepad")) w.Close();