Private Sub GetData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetData.Click Dim DataSet As String Dim GetData As New System.Diagnostics.Process() GetData.StartInfo.UseShellExecute = False GetData.StartInfo.RedirectStandardOutput = True GetData.StartInfo.CreateNoWindow = True Chart1.Series.Add("Meas") Chart1.Series("Meas").ChartType = SeriesChartType.FastLine For j = 0 To (CDbl(FStop.Text) - CDbl(FStart.Text)) / 10 Dim TempStart As Double Dim TempStop As Double TempStart = CDbl(FStart.Text) + j TempStop = CDbl(FStart.Text) + 10 + j GetData.StartInfo.FileName = "d:\...\test.exe" GetData.StartInfo.Arguments = TempStart & " " & TempStop & " " & RBand.Text & " " & VBand.Text & " " & SweepDelay.Text & " " & IntAmp.Text GetData.Start() DataSet = GetData.StandardOutput.ReadToEnd() GetData.WaitForExit() GetData.Close() Dim Hilf_Z As Object Hilf_Z = Split(DataSet, vbCrLf) Dim i As Integer For i = 0 To UBound(Hilf_Z) - 2 Chart1.Series("Meas").Points.AddXY(CDbl(Hilf_Z(i)) * 1000000.0, Val(Hilf_Z(i + 1))) i = i + 2 Next '<-------- here I want to refresh my Chart 'something like: Chart1.ChartArea("ChartArea1").Refresh() 'or Chart1.Series("Meas1").Refresh() 'can't find any methods... Next End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)