以下是部分示例(具体的可以参考MSDN中MSCHART控件的介绍)
Private Sub Form_Activate()
Call GraphShowBasic
Dim MonthValueYL(11, 2)
Dim I As Long
For I = 0 To 11
    MonthValueYL(I, 1) = CStr(I + 1) & "月"
    MonthValueYL(I, 2) = (I + 1) * 2
Next I
With MS1
    .RowCount = 12
    .ChartData = MonthValueYL
    .Column = 1
    .ColumnLabel = "产值(万元)"
    .Refresh
End With
End SubPrivate Sub GraphShowBasic()
With MS1.Plot.Backdrop    ' 除非将样式属性正确地设置为VtFillStyleBrush
      ' 否则不会有颜色显示。
     .Fill.Style = VtFillStyleBrush
     .Fill.Brush.FillColor.Set 100, 255, 200
       ' 添加边框。
      .Frame.Style = VtFrameStyleThickInner
      ' 将样式设置为显示阴影。
     .Shadow.Style = VtShadowStyleDrop
End With
With MS1.Plot
      ' 将样式设置为实心。
      .Wall.Brush.Style = VtBrushStyleSolid
      ' 将颜色设置为。
      .Wall.Brush.FillColor.Set 255, 255, 225
End With
With MS1.Plot '将绘图底色设置为蓝色。
      .PlotBase.BaseHeight = 200
      .PlotBase.Brush.Style = VtBrushStyleSolid
      .PlotBase.Brush.FillColor.Set 0, 0, 255
End With
With MS1.Title.VtFont
   .Name = "Algerian"
   .Style = VtFontStyleBold
   .Effect = VtFontEffectUnderline
   .Size = 14
   .VtColor.Set 255, 0, 255
End With
End Sub

解决方案 »

  1.   

    以下是部分示例(具体的可以参考MSDN中MSCHART控件的介绍)
    Private Sub Form_Activate()
    Call GraphShowBasic
    Dim MonthValueYL(11, 2)
    Dim I As Long
    For I = 0 To 11
        MonthValueYL(I, 1) = CStr(I + 1) & "月"
        MonthValueYL(I, 2) = (I + 1) * 2
    Next I
    With MS1
        .RowCount = 12
        .ChartData = MonthValueYL
        .Column = 1
        .ColumnLabel = "产值(万元)"
        .Refresh
    End With
    End SubPrivate Sub GraphShowBasic()
    With MS1.Plot.Backdrop    ' 除非将样式属性正确地设置为VtFillStyleBrush
          ' 否则不会有颜色显示。
         .Fill.Style = VtFillStyleBrush
         .Fill.Brush.FillColor.Set 100, 255, 200
           ' 添加边框。
          .Frame.Style = VtFrameStyleThickInner
          ' 将样式设置为显示阴影。
         .Shadow.Style = VtShadowStyleDrop
    End With
    With MS1.Plot
          ' 将样式设置为实心。
          .Wall.Brush.Style = VtBrushStyleSolid
          ' 将颜色设置为。
          .Wall.Brush.FillColor.Set 255, 255, 225
    End With
    With MS1.Plot '将绘图底色设置为蓝色。
          .PlotBase.BaseHeight = 200
          .PlotBase.Brush.Style = VtBrushStyleSolid
          .PlotBase.Brush.FillColor.Set 0, 0, 255
    End With
    With MS1.Title.VtFont
       .Name = "Algerian"
       .Style = VtFontStyleBold
       .Effect = VtFontEffectUnderline
       .Size = 14
       .VtColor.Set 255, 0, 255
    End With
    End Sub
      

  2.   

    以下是部分示例(具体的可以参考MSDN中MSCHART控件的介绍)
    Private Sub Form_Activate()
    Call GraphShowBasic
    Dim MonthValueYL(11, 2)
    Dim I As Long
    For I = 0 To 11
        MonthValueYL(I, 1) = CStr(I + 1) & "月"
        MonthValueYL(I, 2) = (I + 1) * 2
    Next I
    With MS1
        .RowCount = 12
        .ChartData = MonthValueYL
        .Column = 1
        .ColumnLabel = "产值(万元)"
        .Refresh
    End With
    End SubPrivate Sub GraphShowBasic()
    With MS1.Plot.Backdrop    ' 除非将样式属性正确地设置为VtFillStyleBrush
          ' 否则不会有颜色显示。
        .Fill.Style = VtFillStyleBrush
        .Fill.Brush.FillColor.Set 100, 255, 200
          ' 添加边框。
          .Frame.Style = VtFrameStyleThickInner
          ' 将样式设置为显示阴影。
        .Shadow.Style = VtShadowStyleDrop
    End With
    With MS1.Plot
          ' 将样式设置为实心。
          .Wall.Brush.Style = VtBrushStyleSolid
          ' 将颜色设置为。
          .Wall.Brush.FillColor.Set 255, 255, 225
    End With
    With MS1.Plot '将绘图底色设置为蓝色。
          .PlotBase.BaseHeight = 200
          .PlotBase.Brush.Style = VtBrushStyleSolid
          .PlotBase.Brush.FillColor.Set 0, 0, 255
    End With
    With MS1.Title.VtFont
      .Name = "Algerian"
      .Style = VtFontStyleBold
      .Effect = VtFontEffectUnderline
      .Size = 14
      .VtColor.Set 255, 0, 255
    End With
    End Sub 
      

  3.   

    chart控件,很酷啊!http://dullwolf.yesky.net