|
|
Title | Copy an image of an MSChart's graph into a PictureBox |
Keywords | MSChart, graph, database, chart, copy, PictureBox |
Categories | Graphics, 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
|
|
|
|
|
|