Menu

Saving a graph to a .jpg file

Help
2008-09-01
2012-09-19
  • Steen Christiansen

    I want to be able to save a picture of the graph from inside my code without getting the 'SaveFileDialog' box to appear. I just want to save a picture and then export it to excel directly without any user intervention needed.

    Is that possible ?

    Steen C

     
    • Julien Vanwinsberghe

      Hi,

      To export the graph in Excel, you can just do a copy-paste, with the Copy() method.

      To save the image on your computer without the file dialog box, you can do :
      [your ZedGraph control].MasterPane.GetImage().Save([filename],[image format])
      or to save it in emf format :
      [your ZedGraph control].MasterPane.GetMetafile().Save([filename])

      Bye

      Julien Vanwinsberghe

       

Log in to post a comment.