2
I wanted to create a transition effect to a form, so in the event OnShow
, I set up the estate AlphaBlend := 0
and, in the OnActivate:
for i := 55 to 255 do
begin
AlphaBlendValue := i;
Update;
sleep(1);
end;
It works perfectly on my equipment, making the form become visible gradually, around two tenths of a second, which gives a more pleasant effect. However, when copying the executable to two other equipment (by the way, identical to mine - same brand and model), the effect takes about two seconds (!), giving a terrible impression!
Does anyone have any idea what might be going on?
It can be a delay in processing the Update command. Exchange it for Application.Processmessages and see if it produces any results.
– Pedro Souza
Originally the command was Application.ProcessMessages. I switched to Update just imagining that there could be a queue of messages causing slowness. But the effect is the same.
– Ricardo Alves Carvalho
Apart from hardware, are the software on the machines the same (or similar)? Windows? Antivirus? In task manager, the processing is similar?
– Andrey
Just one question, we’re talking about VCL or Firemonkey?
– Pedro Souza
They are machines with similar software, even Windows, even Antivirus. I will look at the task manager. The published used is the VCL.
– Ricardo Alves Carvalho
I examined the task manager and the processing of this code doesn’t seem to be weighing anything down. CPU went from 0 to 1 during a blink of an eye and the memory increases 200k while the form remains open (the program consumes just over 6Mb).
– Ricardo Alves Carvalho