Download QCChart2D CF Charting Library for the .Net Compact Framework

Transcript
The Chart View 135
public void InitializeChart()
{
Font theFont;
int numPoints = 25;
double[] x1 = new double[numPoints];
double[] y1 = new double[numPoints];
double[] y2 = new double[numPoints];
double[] y3 = new double[numPoints];
int i;
.
.
.
}
In VB, the constructor for the Form is in Form.Designer.vb module and not the user
programmer Form.vb module. For that reason the chart creation code is placed in the
Form_Load event.
[Visual Basic]
Imports com.quinncurtis.chart2dnetcf
Public Class Form1
Dim chartView1 As ChartView = Nothing
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
InstantiateChartView()
If (chartView1 IsNot Nothing) Then
InitializeChart()
End If
End Sub
Public Sub InstantiateChartView()
' Allow room for a menu in the form
Dim graphRect As Rectangle = New Rectangle(1, 1, Me.ClientRectangle.Width
- 2, Me.ClientRectangle.Height - 2)
' Instantiate chart control
chartView1 = New ChartView(graphRect, Me)
End Sub