|
-
Mar 17th, 2009, 09:33 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Redrawing chart when application is activated?
Hi,
I´m drawing my own charts based on values from a db. I´m drawing "directly" on the forms, so to speak.
The thing is everytime the application is deactivated or if someting comes in front of the charts, the drawing dissappears. For instance, I have a contextmenu in one chart and whenever I use it there is a "hole" in the chart afterwards where the menu has been.
Now I can see the reason for it, but how do I get around it?
Fuga.
Visual Studio 2010 xpress, Visual Studio 2008 pro, SQL Server, SQL Server management studio 2008 r2, MSAccess
-
Mar 17th, 2009, 10:29 AM
#2
Hyperactive Member
Re: Redrawing chart when application is activated?
On Form.Activated or Form.Visible or similar event try to call
Me.Invalidate()
-
Mar 17th, 2009, 10:49 AM
#3
Re: Redrawing chart when application is activated?
Any drawing should be done in the Paint event of the control. If you move your drawing code to the form.Paint event handler, it will fix itself.
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
- Abraham Lincoln -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|