Firstly thanks for all the great work, I love ZedGraph!
I save an image and occasionally it flags a weird error: "Parameter Is Not Valid" which occurs on the command below:
zedChartPrimary.MasterPane.GetImage().Save(sPlayAllDirectory + @"\" + sNextModel + ".png", System.Drawing.Imaging.ImageFormat.Png);
It works fine for most of the time, and for some reason flags the error?
I searched google, there isnt much information on this with regards to ZedGraph.
I switched it to this:
zedChartPrimary.GraphPane.GetImage().Save(sPlayAllDirectory + @"\" + sNextModel + ".png", System.Drawing.Imaging.ImageFormat.Png);
And it seems to work, but I only get one of the GraphPanes on the master.
Additionally: GetMetaFile() flagged a similar error "Generic GDI+ Error"
Which I searched for and found this:
Which indicates the GDI count (??) is too high, my plots work fine 95% of the time, (they plot one after another) - and between each replot they are reinitialised with a Clear() which is what this forum suggested was the issue (not ZedGraph, but same error)
Tricky problem! Appreciate any ideas