Jump to content

  • Log In with Google      Sign In   
  • Create Account

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 ayane   Members   -  Reputation: 104

Like
0Likes
Like

Posted 07 July 2012 - 04:43 PM

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



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS