I'm trying to animate a part of my program, just a simple sliding effect.
My main form consists of 4 frames. I am trying to hide one by moving it (changing the left property) and using F_Main.Repaint after each step.
The only problem is, with each step all the frames flicker!
Is there any way to prevent this flicker as the form refreshes?
The code I am using is:
My main form consists of 4 frames. I am trying to hide one by moving it (changing the left property) and using F_Main.Repaint after each step.
The only problem is, with each step all the frames flicker!
Is there any way to prevent this flicker as the form refreshes?
The code I am using is:
Code:
//Do while pane is not fully shown / hidden
for i := 0 to 150 do
begin
//InfoPane.Top (+/-)= 1
F_Main.Frame_Info.Top := F_Main.Frame_Info.Top + 1;
//MediaLibrary.Height (+/-)= 1
F_Main.Frame_Library.Height := F_Main.Frame_Library.Height + 1;
//Form.Repaint (so that the change is shown)
F_Main.Frame_Player.BringToFront;
F_Main.Repaint;
//Loop
end;