OverviewExamples
Window.SetOrder ( |
Sets the z-order of a window relative to other visible windows on the system. This action can be used to control the order of overlapping windows on the desktop, so that a particular window displays on top, or behind another. The top-most window has the highest z-order.
(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)
(number) The handle of the window to precede the window specified in WndHandle. Alternatively, you can use one of the following constants:
CONSTANT |
VALUE |
DESCRIPTION |
HWND_BOTTOM |
1 |
Places the window at the bottom of the z-order. If the WndHandle parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows. |
HWND_NOTOPMOST |
-2 |
Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window. This window will be the topmost window until it loses focus. |
HWND_TOP |
0 |
Places the window at the top of the z-order. |
HWND_TOPMOST |
-1 |
Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated (loses focus). |
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
See also: Related Actions