怎样避免 MDI 子窗口在最大化(或最小化)过程中出现闪烁

var
  WM_SETREDRAW : DWORD;
  f : TForm2;
begin
    WM_SETREDRAW := $000B;
    SendMessage(ClientHandle,WM_SETREDRAW,0,0);
    f:= TForm2.Create(Application);
    f.Show;
    SendMessage(ClientHandle,WM_SETREDRAW,1,0);
    ReDrawWindow(ClientHandle,nil,0,RDW_INVALIDATE or RDW_ALLCHILDREN);

end;

这个方法更好些,基本上不闪了。(网上整理),需要引用windows.

你可能感兴趣的:(DI)