Im suppose to make an application that tracks electric motors in a manufacturing plant. It needs to have
MotorID: Five-digit string, such as "02340"
RPM: Integer, values in the range of 10 to 10000
Voltage: Integer, values in the range of 1 to 500
Status: String, three characters
The status values are
ON: Motor is online and running
OFF: Motor is online, but not running
MNT: Motor is undergoing maintenance and cleaning
NA: Motor is not available
I was thinking about doing this part in radiobuttons
The application should be able to store at least 10 motor class objects in an array, create an input form in the application that allow users to input new motor records to be added to the array and create another form that displays all the motors in the array in a list box. This is what I got so far, I know its not much, but whats really puzzling me is how am I suppose to show all the data in the listbox in the second form.
This is whatI got for the first form
Public Class Form1 Dim range As Integer = 0 Dim voltage As Integer = 0 Dim motor As String Dim Description As String Dim Status As String Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtrange.TextChanged If range > 10000 AndAlso range < 10 Then End If End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtvoltage.TextChanged If voltage > 500 AndAlso voltage < 1 Then End If End Sub Private Sub btnmotor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnmotor.Click ' the button that allows you to go to the other form to see the listbox Form2.Show() End Sub Private Sub Bbtnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtrange.Click ' add the items to the listbox lb1.Items.Add(tb1.Text) lb1.Selectedindex = lb1.SelectedIndex + 1 End Sub End Class Private Sub myCoolRadioButtons_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles RadioButton1.CheckedChanged, RadioButton2.CheckedChanged, RadioButton3.CheckedChanged, RadioButton4.CheckedChanged ' the radio buttons for the status value If RadioButton1.Checked Then If RadioButton2.Checked Then If RadioButton3.Checked Then If RadioButton4.Checked Then End Sub
and the second form I really dont know where to even start on that one. I know theres a lot of code missing, but if someone could help me out on a direction, that would help out a lot, thanks