回复 2楼 xiangyue0510
绘图部分代码:With Form2.MSChart1
.Plot.SeriesCollection(1).Pen.Width = 30
.Plot.SeriesCollection(1).Pen.Style = VtPenStyleSolid
.Plot.SeriesCollection(3).Pen.Width = 30
.Plot.SeriesCollection(3).Pen.Style = VtPenStyleSolid
.Plot.SeriesCollection(5).Pen.Width = 30
.Plot.SeriesCollection(5).Pen.Style = VtPenStyleSolid
.Plot.SeriesCollection(1).LegendText = "上游水位" & h_min1 & "m"
.Plot.SeriesCollection(3).LegendText = "上游水位" & (h_min1 + h_max1) / 2 & "m"
.Plot.SeriesCollection(5).LegendText = "上游水位" & h_max1 & "m"
.chartType = VtChChartType2dXY '设置图形为二维散点图
End With
保存图片部分代码:
Private Sub Command1_Click()
Image1.Stretch = True
Clipboard.Clear
MSChart1.EditCopy
Image1.Picture = Clipboard.GetData(vbCFBitmap)
Clipboard.Clear '清除粘贴板
SavePicture Image1, "C:\Users\Administrator\Desktop\temp\安全始流曲线.jpg"
End Sub
相关的代码是这样的,麻烦您再看一下问题出在什么地方?
[此贴子已经被作者于2018-2-1 10:15编辑过]