PrivateDeclareFunctionSetWindowPosLib"user32"(ByValhwndAsLong,ByValhWndInsertAfterAsLong,ByValxAsLong,ByValyAsLong,ByValcxAsLong,ByValcyAsLong,ByValwFlagsAsLong)AsLong
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/bianchengyuyan/)ConstSWP_NOMOVE=&H2'不更动目前视窗位置
ConstSWP_NOSIZE=&H1'不更动目前视窗大小
ConstHWND_TOPMOST=-1'设定为最上层
ConstHWND_NOTOPMOST=-2'取消最上层设定
ConstFLAGS=SWP_NOMOVEOrSWP_NOSIZE
'将APP视窗设定成永远保持在最上层
SetWindowPosMe.hwnd,HWND_TOPMOST,0,0,0,0,FLAGS
'取消最上层设定
SetWindowPosMe.hwnd,HWND_NOTOPMOST,0,0,0,0,FLAGS->