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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. DirListBox control in vb.net2005

DirListBox control in vb.net2005

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
5 Posts 3 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.
  • H Offline
    H Offline
    hrishi321
    wrote on last edited by
    #1

    hi to all Could anyone please tell me how to block certain drives to be accessed while looking for sub directories and files. (All I want is to give an environment to the user so that HE CAN LOOK FOR FILES IN A DIRECORY, WHICH ALSO MAY HAVE SUBDIRECTORIES). The tool I am using is dirListBox in vb.net2005. But my problem is that user can go to all the files and directories in the computer. (i WANT HIIM TO ACCESS THE FILES AND FOLDER OF A SPECIFIED DIRECTORY ONLY, SAY INSIDE C:\AA).. NOW HOW TO FILTER THE DIRLISTBOX,? please advice me if any other method is there for the same...(not necessary to be the DirListBox control) THNAKS IN ADVANCE

    D 1 Reply Last reply
    0
    • H hrishi321

      hi to all Could anyone please tell me how to block certain drives to be accessed while looking for sub directories and files. (All I want is to give an environment to the user so that HE CAN LOOK FOR FILES IN A DIRECORY, WHICH ALSO MAY HAVE SUBDIRECTORIES). The tool I am using is dirListBox in vb.net2005. But my problem is that user can go to all the files and directories in the computer. (i WANT HIIM TO ACCESS THE FILES AND FOLDER OF A SPECIFIED DIRECTORY ONLY, SAY INSIDE C:\AA).. NOW HOW TO FILTER THE DIRLISTBOX,? please advice me if any other method is there for the same...(not necessary to be the DirListBox control) THNAKS IN ADVANCE

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      himangshu123 wrote:

      The tool I am using is dirListBox in vb.net2005.

      There is no "DirListBox" in VB.NET. Are you talking about the OpenFileDialog or are you using the old DirListBox from the VB6 days?? The old DirListBox could not be filtered or limited to a group of folders.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      H 1 Reply Last reply
      0
      • D Dave Kreskowiak

        himangshu123 wrote:

        The tool I am using is dirListBox in vb.net2005.

        There is no "DirListBox" in VB.NET. Are you talking about the OpenFileDialog or are you using the old DirListBox from the VB6 days?? The old DirListBox could not be filtered or limited to a group of folders.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        H Offline
        H Offline
        hrishi321
        wrote on last edited by
        #3

        thanks for the reply ok can openfiledialog be make to show or start from a particular directory? User shouldnot be able to view others

        H D 2 Replies Last reply
        0
        • H hrishi321

          thanks for the reply ok can openfiledialog be make to show or start from a particular directory? User shouldnot be able to view others

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          Have a read through the members of OpenFileDialog, in the MSDN documentation. It should be fairly easy to find the correct solution.

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          1 Reply Last reply
          0
          • H hrishi321

            thanks for the reply ok can openfiledialog be make to show or start from a particular directory? User shouldnot be able to view others

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            The OpenFileDialog class is a wrapper to call the Win32 function OpenFile (? I can't remember which the function name exactly!). Win32 displays the dialog, not the .NET class OpenFileDialog. OpenFileDialog is also a sealed (NotInheritable) class, so you can't really modify it at all. You can't even get the window handle to the dialog and start throwing messages at it since your code stops running when you call the dialogs .ShowDialog method. Your going to have to write your own dialog to support this. It would just be a simple Form with a TreeView for a directory browser, and a ListView for files in the currently selected directory. Oh, and of course, a couple of buttons for Open and Cancel.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            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