1.在声明窗体类时加入:
private
procedure CreateParams(var Params: TCreateParams); override;
2.在窗体实现部分加入:
procedure TFrm_Main.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := 33554432; //0x 02 00 00 00
end;
已经测试过,确实能有效解决含有多个控件的窗体的闪烁问题。原帖见: http://social.msdn.microsoft.com/forums/en-US/winforms/thread/aaed00ce-4bc9-424e-8c05-c30213171c2c/
http://blog.sina.com.cn/s/blog_6016bdc80100frvx.html
时间: 2024-09-30 05:55:17