• Advertisement
Sign in to follow this  

[.net] C# paint problem

This topic is 4796 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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();

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement