tags:

views:

45

answers:

2

Hi,

Is there any control drivelistbox in Dot Net ? I have seen this control in VB6 but not in dot net ?

+1  A: 

It depends on what you're using (WPF, WinForms, etc.) but I suppose there is not. You could easily make one though, just populate a ListBox with a list of drives.

You can get an array of the logical drives on your computer using the Environment.GetLogicalDrives() method.

Bertrand Marron
@tusbar : Can i get logical drives click event in C# ?
Swapnil Gupta
@Swapnil - you can get an event when an item in a listbox receives a click or doubleclick.
Gishu
But i want logical drives click event in C#
Swapnil Gupta
such a click event does not come from the drive, it comes from the control that is representing your data. Implementation depends on the platform, which is information you have not given us.
Muad'Dib
I am using Winforms
Swapnil Gupta
A: 

It seems that it has been obsoleted - http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.compatibility.vb6.drivelistbox.aspx

As tusbar rightly said, if you're using WPF - you could make it in a snap with a Listbox databinding to a list returned from a DriveInfo.GetDrives() invocation.

Gishu