请在声明区中加入以下声明
PrivateDeclareFunctionSetWindowPosLib”user32″(ByValhwndAsLong,ByValhWndInsertAfterAsLong,ByValxAsLong,ByValyAsLong,ByValcxAsLong,ByValcyAsLong,ByValwFlagsAsLong)AsLong
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->