J
John Denver
Hello
On a windows form I've added a combo box, in which I display a list of all
removable drives and CDRom's that are attached to my machine. So to get a
list of drives I'm using the GetDrives method, and as I loop through that
collections I look for the correct drive type. If the type is removable I
then make up a string string devicestr = Name + VolumeLabel
Once I make up the string I add it to the comboBox
comboBox1.Items.Add(devicestr);
There may be a more intuitive way of doing that, but my question is this. I
always want to default to my CDRom and have that displayed. How do I make
my combobox display a certain value ?
On a windows form I've added a combo box, in which I display a list of all
removable drives and CDRom's that are attached to my machine. So to get a
list of drives I'm using the GetDrives method, and as I loop through that
collections I look for the correct drive type. If the type is removable I
then make up a string string devicestr = Name + VolumeLabel
Once I make up the string I add it to the comboBox
comboBox1.Items.Add(devicestr);
There may be a more intuitive way of doing that, but my question is this. I
always want to default to my CDRom and have that displayed. How do I make
my combobox display a certain value ?