Sign in to follow this  

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

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

Hello!

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?



Thanks

Share this post


Link to post
Share on other sites

This topic is 1984 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this