Reputation: 899
I write WinForms Application and I want to draw FPS on each of it. Is there any way to get it from window or get number of frames used to draw window in 1 sec?
Upvotes: 0
Views: 871
Reputation: 21927
Your question doesn't make much sense. Winforms uses GDI+ as a graphics engine, which does not mainting a constant redraw loop. Windows are only redrawn as needed when they are invalidated for any reason.
You can use a System.Diagnostics.StopWatch
to measure how long a single iteration of painting takes.
The inverse of this value is the theoretical frame rate you can achieve.
Upvotes: 2