Click here to Skip to main content
16,020,343 members

Comments by Daniel Davis 2024 (Top 2 by date)

Daniel Davis 2024 10-Aug-24 11:00am View    
So I've altered my code so most of the heavy lifting isn't done in the paint operation.

The code at form load creates an array of five bitmaps, cuts the appropriate segment from the main animation image, and puts each 1024x768 image into their spots in the array.
So then the timer just changes the reference number and loops when it gets to 5 back to the beginning.
The paint cycle is just grabbing the correct 1024x768 image from the array the Timer asks for and painting that onto the form.
But somehow it's still very slow. I think something is gumming up inside the code that I'll have to step through to check.
Thank you very much for the ideas about optimization. The code IS much more efficient now.
Daniel Davis 2024 9-Aug-24 22:31pm View    
System.Windows.Forms.Timer

A bog standard Windows Forms Timer Control.