troubleshooting Question

Graphics on form not being saved to file

Avatar of futuremoose
futuremoose asked on
Visual Basic.NET
2 Comments1 Solution288 ViewsLast Modified:
Hello,

I have a very simple vb.net example, where I am using GDI+ to draw a simple pattern directly on the form... just a checkerboard of black/white squares. That bit works fine. See the attached screenshot.

However, if I try to save the form as an image file, the pattern I drew is not included (again, see screenshot). The pattern does not get erased off the form, but it is not included in the image file.

If the form is "refreshed", or another window covers up the pattern, then it is erased... that part I understand. But I don't know why the pattern does not show up on the image saved to a file.

I have included the Form1.vb file, which has all the code... to try it just create a new form with 3 buttons, and copy/paste the contents of my Form1.vb into yours.
sshot.jpg
Form1.vb
ASKER CERTIFIED SOLUTION
Mike Tomlinson
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros