I have 2 combo boxes. One is in a form called subcat_selector.vb
on the button Pick Sub Catagory.click event it shows the subcat_selector form. form there, the onload event:
the user then clicks a confirm button, which hides the form. This section of the code works. it is the other section that I am having problems with
this is supposed to change the contents of combo box 1 in the main form:
but nothing shows up in the combo box in the main form...
on the button Pick Sub Catagory.click event it shows the subcat_selector form. form there, the onload event:
VB.NET:
Dim button As DialogResult
button = MsgBox("Please select the sub-catagory that the game you want to play is located in.", MsgBoxStyle.OkCancel, "Select a sub catagory")
If button = Windows.Forms.DialogResult.OK Then
For Each game As String In System.IO.Directory.GetDirectories("C:\gmtst")
ComboBox1.Items.Add(game)
Next
Else
Me.Close()
End If
this is supposed to change the contents of combo box 1 in the main form:
VB.NET:
For Each game As String In System.IO.Directory.GetFiles(subcat_selector.ComboBox1.SelectedItem)
ComboBox1.Items.Add(game)
Next
but nothing shows up in the combo box in the main form...