1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
9 // static char *VB_Name = "TopMost_Module";
10 // --- Option Explicit
11 // --- const int SWP_FRAMECHANGED = 0x20;
12 // --- const int SWP_HIDEWINDOW = 0x80;
13 // --- const int SWP_NOACTIVATE = 0x10;
14 // --- const int SWP_NOCOPYBITS = 0x100;
15 // --- const int SWP_NOMOVE = 0x2;
16 // --- const int SWP_NOOWNERZORDER = 0x200;
17 // --- const int SWP_NOREDRAW = 0x8;
18 // --- const int SWP_NOSIZE = 0x1;
19 // --- const int SWP_NOZORDER = 0x4;
20 // --- const int SWP_SHOWWINDOW = 0x40;
21 // --- const int SWP_DRAWFRAME = SWP_FRAMECHANGED;
22 // --- const int SWP_NOREPOSITION = SWP_NOOWNERZORDER;
24 // --- const int HWND_BOTTOM = 1;
25 // --- const int HWND_BROADCAST = 0xFFFF;
26 // --- const int HWND_DESKTOP = 0;
27 // --- const int HWND_NOTOPMOST = - 2;
28 // --- const int HWND_TOP = 0;
29 // --- const int HWND_TOPMOST = - 1;
31 int SetWindowPos(long h, long hb, int X, int Y, int cx, int cy, int f);
33 void TopMost(Object obj)
37 i = SetWindowPos(obj.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE);
40 void UnTopMost(Object obj)
44 i = SetWindowPos(obj.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE);
47 void HideWindow(long hWnd)
51 i = SetWindowPos(hWnd, HWND_BOTTOM, 100, 100, 200, 200, SWP_HIDEWINDOW);