Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
TitleCopy an image of an MSChart's graph into a PictureBox
KeywordsMSChart, graph, database, chart, copy, PictureBox
CategoriesGraphics, Controls
 
When the program starts, it creates a random graph. When you click the Copy button, the program calls the control's EditCopy method to copy a metafile image of the graph into the clipboard. It then uses the Clipboard object's GetData method to copy the metafile data into the PictureBox.
 
Private Sub Command1_Click()
    Chart1.EditCopy

    Picture1.AutoRedraw = True
    Picture1.Picture = Clipboard.GetData(vbCFMetafile)
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated