Monday, August 6, 2012

Graphic Lines in picture box gone after switching tab pages (C#)

In a program i'm working with, I have a timer event which draws lines or graphs on a picture box. This picture box is inside a tab and panel.

When I switched views to other tabs and return to the tab that has the picture box, the previous lines or graphs disappears. I suspect, the controls are redrawn when switching tabs.

I tried several solutions and options in picture box paint event and infact tried overriding it. Same results.

Luckily, I found a tip in an article to draw the real time graphics on the image itself. This helped solve the issue.

Greg

0 comments:

Post a Comment