Yeah they are TPanels thanks totally missed that I'll change it...
But yeah I see there's still jitter. is there no way to eliminate the jitter or better yet educate me on what's causing it coz it looks like the image behind it is refusing to stay still and moving up and down.
I'm wondering if your loop is accurate enough.
For example if I do this it's much smoother:
var
stepX: Integer=1;
stepY: Integer=1;
...
if leftTo < leftFrom then stepx := -1;
if TopTo < TopFrom then stepy := -1;
while (tpanel(moveobj).Left <> LeftTo) or (tpanel(moveobj).Top <> TopTo) do
begin
if (tpanel(moveobj).Left <> LeftTo) then
tpanel(moveobj).Left := tpanel(moveobj).Left + stepx;
if (tpanel(moveobj).Top <> TopTo) then
tpanel(moveobj).Top := tpanel(moveobj).Top + stepy;
Draw;
Repaint;
end;
(typed rough out of hand and needs some checking in case you go with bigger steps)
So you need to make sure the steps are all equal.
@GetMem: The panel would still need to move because the background behind the panel needs to move
against the image. Or you would need to use transparent images/panels.
"then move the screenshot against the background."
How would you move a screenshot against a background? A screenshot is solid.
(Or did you have something else in mind?)