Minimize window again, the inside of each control is a mass of black first, and then slowly showed the same, one can minimize the return to several seconds to complete, according to this problem even the compiled exe to run, too, said online what double buffer, not only no use, even in the design period of the interface that is displayed in a mess, a said the following code is also available online can solve the flashing of the compiled exe:
Private
Procedure CreateParams (var Params: TCreateParams); Override.
Procedure TFrm_Main. CreateParams (var Params: TCreateParams);
The begin
Inherited;
Params. ExStyle:=33554432;//02 00 00 00 0 x
end;
This code is able to solve the problems of flashing just show out the form, but when the form to minimize the return, there is no effect, I think every time is to minimize the return, Delphi to redraw form,
This problem will not only D7, more than 2010 version seemed, anyway, I started now use Delphi XE2 10 Seattle, exist all the time, tried to reinstall system, reshipment Delphi, not a bit, to use baidu once, as if no one talked about this problem, basic didn't have this problem? Don't think so..
CodePudding user response:
With Delphi2006 when met before, but not often jammed, there is no good method, can only install the other software less, may be software conflict,CodePudding user response:
This related to your hardware, CPU speed, inner, graphics card memory, and so onCodePudding user response:
Suggest change a video card, try, sometimes conspicuous reflection, is slowly,CodePudding user response:
Sorry, and I've never met this kind of situation, this kind of situation is usually program CPU utilization rate is very high in GUI update slow,CodePudding user response:
I've met, graphics, display slow,CodePudding user response:
Today just received a I5 4460, 8 gb of memory, solid, shadow chi 750 ti graphics card, and then install Windows 7 64, new fresh install Delphi,Sorry, will appear this problem, it seems not a hardware problem,
CodePudding user response:
I had a test, in a window to create more than 1000 components, in a high zoom window with the machine can see the obvious refresh process, but also is instantaneous, not slow to unacceptable, WS_EX_COMPOSITED (0 x02000000) extension style can improve flicker, but this style has serious side effects, side effects on different systems, such as the the button of the client area disappear animation effects, the scroll bar flashing, CPU utilization rate is higher, you can try: 1. The code does not involve mapping interface in a separate thread, the main thread to refresh interface, 2. Use less personal advice WS_EX_COMPOSITED style, (3) as far as possible to reduce the use of the child window class controls, which reduce the CreateWindow create components, use DirectUI way create components or use FMX library, even the way HTML + javascript + CSS to create interface,CodePudding user response:
The test code is as follows:
procedure TForm1.FormCreate(Sender: TObject);
Type
TWindowControlClass=class of TWinControl;
Const
ObjList: array [11] 0.. of TWindowControlClass=(
TButton TButton, TButton,
TCheckBox, TCheckBox TCheckBox,
TEdit TEdit, TEdit,
TRadioButton TRadioButton, TRadioButton);
Var
I, j: integer;
AControl: TWinControl;
The begin
AutoScroll:=true;
WindowState:=wsMaximized;
For I:=0 to 11 do
For j:=0 to 99 do
The begin
Acontrol:=ObjList [I] the Create (Self);
AControl. Parent:=the Self;
AControl. Width:=150;
AControl. Height:=20;
AControl. Left:=I * 160;
AControl. Top:=j * 20 + 5;
If AControl. ClassType=TButton then
(AControl as TButton). Caption:='this is a button'
The else
If AControl. ClassType=TCheckBox then
(AControl as TCheckBox). Caption:='this is a checkbox'
The else
If AControl. ClassType=TEdit then
(AControl as TEdit). Text:='this is a edit'
The else
If AControl. ClassType=TRadioButton then
(AControl as TRadioButton). Caption:='this is a radiobutton';
end;
end;
Field on your form 1200 components, it is with a handle to the window (from TWinControl derived), compiled using XE5, tested two computers, one AMD A10-6800 k, an Intel i7-6700 k, are 16 gb of memory, nuclear show (we regret that the 4, 5 years since computers are explicitly), running smoothly, just recover from minimize sometimes can feel the twinkle, the movement of the other window, zoom, click, input is no problem, is the oldest one server (Pentium4 xeon 2.8 GHz, 1 gb of memory, actually it's just that we're the oldest x86 computers, the old computer is really a rs/6000 s80 server, has been running for nearly 18 years, estimate the electricity consumption of the tens of thousands of ) a test on the (remote desktop), start with 2 ~ 3 seconds delay, from minimizing have obvious refresh process, from top to bottom, from right to left, but window moving, scaling, click, input do not have any problem,
So I estimate your question may be:
1. Some components of event handling more time-consuming;
2. Have more since the draw, and optimization;
3. Overloading the process, some window or Application. The OnMessage, some operation take or cause to redraw repeatedly,
CodePudding user response:
Never met, but I have been using Delphi7, high version of the installation program is too big,CodePudding user response:
If a window or an interface, visual components more than 100, should be the design ideas, general xe above and visual components of more than 100 will have this kind of phenomenon,