一、设为总在上方: 将Form1的FormStyle设为fsStayOnTop 二、禁止别的应用程序关闭自已的程序。 在你的应用中设一个BOOL值的参数。然后再在OnCLoseQuery中对比一下,如果你没有手工将此参数设为相应的值,则不允许关闭。 如: if CanShutDown then CanClose:=true else CanClose:=false;
BOOL SetWindowPos( HWND hWnd, // handle of window HWND hWndInsertAfter, // placement-order handle int X, // horizontal position int Y, // vertical position int cx, // width int cy, // height UINT uFlags // window-positioning flags );
将Form1的FormStyle设为fsStayOnTop
二、禁止别的应用程序关闭自已的程序。
在你的应用中设一个BOOL值的参数。然后再在OnCLoseQuery中对比一下,如果你没有手工将此参数设为相应的值,则不允许关闭。
如:
if CanShutDown then
CanClose:=true
else
CanClose:=false;
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);