How to save MSChart to bitmap in VB.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lathamoulali
    New Member
    • May 2008
    • 25

    How to save MSChart to bitmap in VB.NET

    Hello frnds,

    Help me out..
    I have to save the MSChart to a bitmap in VB.NET 2005.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Does MSChart expose a graphics object?

    Comment

    • lathamoulali
      New Member
      • May 2008
      • 25

      #3
      Originally posted by Plater
      Does MSChart expose a graphics object?
      NO it won't expose a graphics object..
      i am writing code for this chart as the following

      ' Set the chart size
      MSChart1.RowCou nt = objRecordset.Re cordCount
      MSChart1.Column Count = intSelectedColu mnCount

      ' Set the chart data
      i = 1
      Do While Not objRecordset.EO F
      For j = LBound(Columns) To UBound(Columns)
      ' Set data
      If Not IsNull(objRecor dset.GFields(Fi eldNames(j)).Va lue) Then
      MSChart1.DataGr id.SetData(i, j + 1, CDbl(objRecords et.GFields(Fiel dNames(j)).Valu e), False)
      Else
      MSChart1.DataGr id.SetData(i, j + 1, vbNull, True)
      End If

      Next j

      objRecordset.Mo veNext()
      i = i + 1

      Loop



      and now the chart is ready with the graph,which i want to save in the bitmap..
      Please help me out..
      Thanks.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well I think you have to use GDI+ functions to get it into a bitmap.
        Unless it has the DrawToBitmap() function (not supported for activeX objects). It also will not show up under intellisense.

        Comment

        • lathamoulali
          New Member
          • May 2008
          • 25

          #5
          To save the MSChart as bitmap in VB.NET

          Hello frnds,

          I have MSChart and i want to save this chart as a Bitmap in VB.NET.
          Please help me out.
          Thanks,

          Comment

          • Curtis Rutland
            Recognized Expert Specialist
            • Apr 2008
            • 3264

            #6
            Please don't double post. If your question hasn't been answered you can reply to your old thread to bump it back to the top. I have merged your threads.

            MODERATOR

            Comment

            • SammyB
              Recognized Expert Contributor
              • Mar 2007
              • 807

              #7
              Did you ever solve this problem? I'm also trying to do it. I'm using VB.Net 2008. Thanks! --Sam

              Comment

              Working...