16,020,343 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.