Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Accessing network drives

Accessing network drives

Scheduled Pinned Locked Moved C#
questionsysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Schokoolero
    wrote on last edited by
    #1

    I'm currently trying to create an OpenDialog that is similar to the Windows Explorer in appearance. (TreeView on the left, ListView on the right) To get the logical drives is pretty simple. I just use the Directory.GetLogicalDrives() method. However, I didn't find anything similar to access network drives, like in the Network-node in the Windows Explorer TreeView. I found a few solutions, that take hundreds of lines of code to get the result, that this one method achieves for the logical drives. Is there no shorter way? If there is one, what is it?

    P 1 Reply Last reply
    0
    • S Schokoolero

      I'm currently trying to create an OpenDialog that is similar to the Windows Explorer in appearance. (TreeView on the left, ListView on the right) To get the logical drives is pretty simple. I just use the Directory.GetLogicalDrives() method. However, I didn't find anything similar to access network drives, like in the Network-node in the Windows Explorer TreeView. I found a few solutions, that take hundreds of lines of code to get the result, that this one method achieves for the logical drives. Is there no shorter way? If there is one, what is it?

      P Offline
      P Offline
      Phillip M Hoff
      wrote on last edited by
      #2

      Is there a reason why you're not using the common OpenFileDialog? Unless there is some technical reason or compelling user scenario for not doing so, I'd suggest using the common Windows dialogs because they help to keep a consistent user interface across applications and therefore breeds familiarity for the user. In addition, if Microsoft decides to revamp the dialogs, your application will automatically inherit the improvements. Plus, it's a lot less work. :-) Anyway, just my humble opinion. I realize that the common dialogs won't work well in every possible situation. -Phil

      S 1 Reply Last reply
      0
      • P Phillip M Hoff

        Is there a reason why you're not using the common OpenFileDialog? Unless there is some technical reason or compelling user scenario for not doing so, I'd suggest using the common Windows dialogs because they help to keep a consistent user interface across applications and therefore breeds familiarity for the user. In addition, if Microsoft decides to revamp the dialogs, your application will automatically inherit the improvements. Plus, it's a lot less work. :-) Anyway, just my humble opinion. I realize that the common dialogs won't work well in every possible situation. -Phil

        S Offline
        S Offline
        Schokoolero
        wrote on last edited by
        #3

        The common OpenFileDialog can't be modified (At least not without some rather complicated hacking.). I just thought it would be a lot nicer to have one dialog instead of using the common dialog and opening a custom dialog upon closing the common one, to ask the user for all the remaining settings. With my custom OpenDialog filtering is a lot more flexible. I can not only filter files by their ending, but also display them in the listView without it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups