Jump to content
  • Advertisement
Sign in to follow this  

C# Tool render window erasing on scroll and won't redraw until mouse release

This topic is 2355 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


So I am creating a tool in C# which has basically only 2 panels in it at the moment; the left panel has all the buttons and stuff like that for editing. Then a panel on the right which is for drawing. The panel for drawing is a custom class i made which is just a panel with double buffering enabled. I am using directX to render things, the render function is called after the form is created and replaces the standard Application.Run() that is generated by Visual studios.

The Problem:

Anytime I scroll down (using panels auto scroll) in the rendering panel I get blank space until I let go of the mouse button. The same thing will happen if i move the panel out of view (like all the way off the screen) then drag it back without letting go.

Ive searched for a while on google for it; I've read that about OnPaint and OnPaintBackground will sometimes fight for control in situations like this or something of that sort. So i tried overriding them to do nothing and it didnt change anything. I've also tried invalidating the window after every render as well; which didn't work either.

Does anyone have any idea what I should be doing here?


Share this post

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!