Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] C# paint problem

Started by khalligan Jan 7, 2005 at 7:56 AM 0 replies 800+ views
Original Post
khalligan
khalligan
I am writing an application (GUI Designer), that has a load of gui controls, Im using the ControlPaint class to draw these controls in their respective Paint() functions of each controls class. The problem is when the app loads a file first, these controls take 2-5 seconds to draw. From then on no problems, and if I close a file and open another it works fine aslong as app isn't restarted. Ive tried every form of forcing painting:
  • Invalidate(true)
  • Refresh()
Both to no avail! This has been slowly annoying me for weeks now, does anyone out there have a good solution (or any solution) to this. All the best, Keith
Sijmen
Sijmen
It's not exactly clear for me what's the problem, but according to the method calls you posted, I guess it's about forcing a control redraw. This often works for me:

Control.Update();

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.