Public Class VariableControl Dim array_of_all_values As Object Dim NumCol, NumRow As Integer Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click Try If Values.ShowDialog = Windows.Forms.DialogResult.OK Then Dim MyArray(4) As Double MyArray(0) = Values.tbUno.Text MyArray(1) = Values.tbDos.Text MyArray(2) = Values.tbTres.Text MyArray(3) = Values.tbCuatro.Text MyArray(4) = Values.tbCinco.Text dgvValues.Rows.Add(MyArray(0), MyArray(1), MyArray(2), MyArray(3), MyArray(4)) chXBar.Series(0).Points.Add(MyArray.Average) chRange.Series(0).Points.Add(MyArray.Max - MyArray.Min) chXBar.ChartAreas(0).AxisY.IsStartedFromZero = False chRange.ChartAreas(0).AxisY.IsStartedFromZero = False End If Catch ex As Exception MsgBox("Please enter in numeric values.") End Try End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)