VB.Net ComboBox not displaying Items

Robkemp76

Member
Joined
Nov 30, 2004
Messages
6
Programming Experience
Beginner
I wrote a little VB.Net program that is having an issue where on one computer the predefined list of items shows up after I build the app. However when I take that exe to another machine, the combo box will not display the predifined list of items. Interestingly enough, on this same form, I have made a "Browse" button. The browse button opens up a Folder Browser. If I open up the folderbrowser dialog box, select a folder in the list, click OK, it adds the item to a different combo box. Once that is done, all items show up properly in combo first combobox. Heres about what this looks like in code...


Private Sub Frm_Load
combobox1.items.add("Test1")
combobox1.items.add("Test2")
end sub
//Note I've also added these to the Collection in Visual
//Studio.Net's properties for the control.

Private Sub Browse
dim FldrBrowser as New FolderBrowser
fldrbrowserer.showdialog()
if fldrbrowser.selectedpath <> "" then
else
combobox2.items.add(fldrbrowser.selectedpath)
end if
end sub


I've also deleted the combo box and recreated it with a different name. Still have no idea what would cause this problem. Additionally, when I added back this combo box, I noticed a few other weird things.
1. when I click Browse and have the FolderBrowser dialog box come up, the buttons on the dialog box are blank. If I highlight a line in the folder list, then the buttons show.
2. In the folder list, the physical drives have differing icons than anything else listed. The physical drives show a hard drive icon, but the icon's background is a black square. Not sure what that is.


That's pretty much it. The form has two combo boxes. ComboBox2 starts out empty. ComboBox1 starts out with two items from the time the form loads. Any help on this would be appriciated.
 
Top Bottom