| Optional. A Variant value. This may be empty or missing, a string window title name, a string name of an McWindow iLPn the Windows collection, an McWindow object or a scalar window handle value.
If the argument is missing or empty (the default), then the window handle of the application's top level window is returned.
If the argument is a string, several tests are performed. If the caption of any top level window (including popups) exactly matches the string, then that window's handle is returned. Next if the caption of any top level window matches the argument up to the length of the argument, then that window handle is returned. Finally, the name used as an McWindow.Name property to do a look up in the Windows collection. All string comparisons are case-insensitive.
If the argument is given as an McWindow object, then the window handle of that MDI child window is returned.
Finally if the argument is given as a scalar numeric value, then if that value is a legal window handle it is returned, otherwise 0 is returned. This allows you to test whether a value previously returned from FindWindow refers to a window that is still open.
|