Been trying to port a program written in vb to free pascal and with alot of code and re-codeing and pascal versions I still can't match the speed of vb. The vb code used a library for animated gifs saying it was DC Windowless.
What I'm finding in free pascal is all graphics eventually end up on the form.canvas. So if there's 100 sprites running each updateing their timage then it ends up translating to a canvas redraw. No matter what a change of any control on the from ends up refreshing the form.canvas.
So I tried useing a new form for each sprite, this helped alot because all the sprites were running on a little form and their animations weren't triggering a refresh on the main form which fits the whole screen. I guess that's dc windowless. Even though this helped it causes the windows file csrss.exe to use a lot of cpu power and mem so while it appears my program is useing less mem and cpu and running faster it's really just moveing it's resource usage in csrss.exe. I suppose csrss.exe is doing it's job since it's supposed to cordinate multiple forms.
I guess what I'm asking is there a way to create a second form with only it's canvas and none of the other properties associated with a form? I just need a way to update only portions of the screen without redrawing the whole screen.