Hi Guys, hoping you can help me out with a problem Im having with a checkedlistbox.
Just to be sure we are on the same page - I am an absolute novice, have managed to bumble my way through a few applications.
I am trying to put together a simple small application that will map a few network shares, depending on which ones are selected from the checked list box (about 22 possibilities).
Im not even sure I can get the box to do what I want, however I think it should.
Basically I want a list of drive names (not the UNC paths) that I can put a check next to and then hit a button and have them map (not interested in the mapping code, that I can do - I think).
I am struggling with getting the checked items to return data that I want. I can pull the index number or the simple drive name from the list box, however I was hoping that I could associate either of them with the actual usable data.
ie.
checkedlistbox
Drive 1
Drive 2
Drive 3
etc..
When selecting any of those a value that is not the index or the plain name be referenced instead (\\share\path).
I am doing this in Visual Studio 2010. Populating the checkedlistbox is a piece of cake, I just cant seem to find a way to convert the index number or the checkedname to the data that I can then work with to perform the required task.
I hope that makes some sense.
Once I can convert the plain name to an actual UNC path I should then be able to run a For loop to run through all of the selections and perform a network mapping operation on each of them. That is the plan at least.
Cena.
Just to be sure we are on the same page - I am an absolute novice, have managed to bumble my way through a few applications.
I am trying to put together a simple small application that will map a few network shares, depending on which ones are selected from the checked list box (about 22 possibilities).
Im not even sure I can get the box to do what I want, however I think it should.
Basically I want a list of drive names (not the UNC paths) that I can put a check next to and then hit a button and have them map (not interested in the mapping code, that I can do - I think).
I am struggling with getting the checked items to return data that I want. I can pull the index number or the simple drive name from the list box, however I was hoping that I could associate either of them with the actual usable data.
ie.
checkedlistbox
Drive 1
Drive 2
Drive 3
etc..
When selecting any of those a value that is not the index or the plain name be referenced instead (\\share\path).
I am doing this in Visual Studio 2010. Populating the checkedlistbox is a piece of cake, I just cant seem to find a way to convert the index number or the checkedname to the data that I can then work with to perform the required task.
I hope that makes some sense.
Once I can convert the plain name to an actual UNC path I should then be able to run a For loop to run through all of the selections and perform a network mapping operation on each of them. That is the plan at least.
Cena.