Results 1 to 4 of 4

Thread: Printing MSChart

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Printing MSChart

    Is there anyway to print the MSChart control from VB 6?
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697
    you could use Me.PrintForm

  3. #3
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    I think you'll find this as been asked on here a number of times, do a search.
    VB Code:
    1. Private Sub mnuPrint_Click()
    2.  
    3. MsChart1.EditCopy 'copies a picture of the chart
    4. '(meta file format) and the chart data to the clipboard
    5.  
    6. 'adjust the coordinates to suit your needs
    7. Printer.PaintPicture Clipboard.GetData(vbCFMetafile), 0, 0, _
    8. MsChart1.Width, MsChart1.Height
    9.  
    10. Printer.EndDoc 'sends the chart to the printer
    11.  
    12. Clipboard.Clear
    13.  
    14. End Sub
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  4. #4

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    Thanks very much for you help.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width