VB中怎么使用mschart控件

VBWHERE 2007-01-12 06:45:13
哪位大哥给点代码看看,案例也行,ren51me@163.com这我邮箱
我想作的是彩票走势图那种格式的
...全文
691 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
loverpyh 2007-02-01
  • 打赏
  • 举报
回复
建议去msdn搜索一下
loverpyh 2007-02-01
  • 打赏
  • 举报
回复
up
guyehanxinlei 2007-01-31
  • 打赏
  • 举报
回复
Private Sub Command1_Click()
Dim iCol As Integer
Dim iRow As Integer
Dim i As Integer
With MSChart1
'// 以线条方式显示
.chartType = VtChChartType2dBar
'// 把刻录改为手工方式
'.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
'// 设置最大值
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = 700
'// 设置最小值
.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
'// 设置每格为 50
.Plot.Axis(VtChAxisIdY).ValueScale.MinorDivision = 50

'// 增加测试数据
.ColumnCount = 4
.RowCount = 5
For iCol = 1 To .ColumnCount
For iRow = 1 To .RowCount
.Column = iCol
.Row = iRow
.Data = iCol * iRow
Next
Next
.Column = 3
.Row = 3
.Data = 112
'// 将图表作为图例的背景。
.ShowLegend = True
'// 标记每个点的值
For i = 1 To .Plot.SeriesCollection.Count
.Plot.SeriesCollection(i).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeAbovePoint
Next

End With
End Sub
VBWHERE 2007-01-15
  • 打赏
  • 举报
回复
网上找了些,看不太明白,很菜,初学VB高手赐教
guyehanxinlei 2007-01-15
  • 打赏
  • 举报
回复
自己到网上找一下吧,我想会有的
VBWHERE 2007-01-15
  • 打赏
  • 举报
回复
顶上去

7,759

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧