Results 1 to 5 of 5

Thread: Drive list in .net [RESOLVED]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Drive list in .net [RESOLVED]

    What happened to the drive list that vb6 had? Am I missing something in my IDE?
    Last edited by Andy; Feb 11th, 2004 at 09:53 PM.

  2. #2
    New Member
    Join Date
    Oct 2003
    Location
    Greece
    Posts
    10
    you need to add this in the toolbox

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    There is no drivelist native to .NET, however you can use it as a compatibility control. But that is replaced by OpenFileDialog, SaveFileDialog and if you are using 2003, FolderBrowserDialog.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    I've used those controls.

    is it just the same to use the folder browser to select drives?

  5. #5
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    if you add a combo box to your form, you can bung all your drives into it on load , eg:
    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         ComboBox1.Items.AddRange(Environment.GetLogicalDrives)
    3.         ComboBox1.Text = Application.ExecutablePath.Substring(0, 3) '/// your local drive.
    4.     End Sub
    then you could loop through the folders / files in a particular drive by clicking on the combo box's item / add them to a listbox.
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width