[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.
Re: Redrawing chart when application is activated?
On Form.Activated or Form.Visible or similar event try to call
Me.Invalidate()
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.