TO znxia:可以拦截WM_PAINT消息实现你的想法.var Form1: TForm1; OldProc: Pointer; bBusy: Boolean;implementation{$R *.dfm}Function WinProc(Hwnd, Msg, wParam, lParam: Longint): LRESULT; stdcall;begin case Msg of WM_PAINT: if not bBusy then Result := CallWindowProc(OldProc, Hwnd, Msg, wParam, lParam); else Result := CallWindowProc(OldProc, Hwnd, Msg, wParam, lParam); end;end;procedure TForm1.btn1Click(Sender: TObject);begin pnl1.Visible := not pnl1.Visible;end;procedure TForm1.FormCreate(Sender: TObject);begin //截取窗口消息 OldProc := Ptr(GetWindowLong(Handle, GWL_WNDPROC)); SetWindowLong(Handle, GWL_WNDPROC, Integer(@WinProc)); bBusy := False;end;procedure TForm1.btn2Click(Sender: TObject);begin bBusy := not bBusy;end;LZ想做什么我没看懂,不过2楼的我看懂了,呵呵