Graphic Problem [modified]
-
Hi Everybody With Graphics Class in C# for example I draw a line on the panel, But after minimizing the form and show again the line disappear in the other hands, after refreshing form all graphic objects will be disappear. What is your recommendation for permanent graphic object in the form?
Best Regards, Reza Shojaee
modified on Wednesday, August 19, 2009 1:01 AM
-
Hi Everybody With Graphics Class in C# for example I draw a line on the panel, But after minimizing the form and show again the line disappear in the other hands, after refreshing form all graphic objects will be disappear. What is your recommendation for permanent graphic object in the form?
Best Regards, Reza Shojaee
modified on Wednesday, August 19, 2009 1:01 AM
You are using the CreateGraphics method. This is completely useless unless you're drawing something temporary. Handle the Paint event and draw your line there, that's what it is for
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.