Groups | Blog | Home
all groups > dotnet drawing api > january 2006 >

dotnet drawing api : How to know which parts need invalidating?


Chris Y
1/26/2006 11:22:36 PM
I have an application where for performance reasons I am Invalidating parts
of a Panel depending which part of the Panel has been modified.

I am doing fine until I have the application covered by other Windows
applications. When another application covers my app, getting my
application back into focus by clicking its title bar or Alt-Tab works fine
as somehow Windows knows how to restore the previously hidden parts.

However, if I click some part of my Panel to get the application into focus,
and where that particular click action would normally Invalidate only
certain parts of the Panel, then only those certain parts would be repainted
when my application gets back focus. Windows does not restore the parts of
my application which was previously covered by another window.

What are you recommendations for handling such a situation? Thanks.

Chris Y
1/26/2006 11:55:45 PM
I solved it. I put an handler in Form.Activated to repaint everything
everytime the form gets focus.

Thanks for reading.

[quoted text, click to view]

AddThis Social Bookmark Button