处理WM_ERASEBKGND消息;
procedure TCoolForm.WMEraseBkgnd(var Message: TWMEraseBkgnd);
begin
message.Result := 1;
end;

解决方案 »

  1.   

    处理窗口消息
    procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;procedure TForm.WMEraseBkgnd(var Message: TWMEraseBkgnd);
    begin
    message.Result := 1;
    end;
      

  2.   

    经过测试dragongong提供的例子没能解决
      

  3.   

    本人今天用另一个方法可以做到
    在MOUSEDOWN中加入
    FORM1.PERFORM(WM_SETREDRAW,LONGINT(TRUE),0);
    可得,但其后的背景刷新速度慢。得法更好的办法吗?
      

  4.   

    另补充一点:我在MOUSEDOWN中用了一些方法使得窗体可以拖动才有上面的写法。
      

  5.   

    在MouseDown时处理
    procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    begin
       If button = mbleft then
       begin
         releasecapture;
         TWincontrol (Parent).perform (WM_syscommand, $F012, 0);
       end;
    end;
      

  6.   

    对不起, 前面的TWincontrol(Parent)在这里需要改称form的名字