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. Visual Basic
  4. Fixed path for File Open/Save Dialog....

Fixed path for File Open/Save Dialog....

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
5 Posts 4 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.
  • I Offline
    I Offline
    ibexcentral
    wrote on last edited by
    #1

    Is it possible to fix the directory of the File Open/Save dialog and NOT allow the user to change it ? For example: c:\fixeddiretory

    D C 2 Replies Last reply
    0
    • I ibexcentral

      Is it possible to fix the directory of the File Open/Save dialog and NOT allow the user to change it ? For example: c:\fixeddiretory

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

      That's not supported in the standard OpenFileDialog. You can set the InitialDirectory property to the path you want, but you can't prevent the user from navigating out of it. You could implment your own OpenFileDialog class by inheriting from CommonDialog and writing you own control from there. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      I 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That's not supported in the standard OpenFileDialog. You can set the InitialDirectory property to the path you want, but you can't prevent the user from navigating out of it. You could implment your own OpenFileDialog class by inheriting from CommonDialog and writing you own control from there. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        I Offline
        I Offline
        ibexcentral
        wrote on last edited by
        #3

        Do you know of any examples ? or know where to start ?

        C 1 Reply Last reply
        0
        • I ibexcentral

          Do you know of any examples ? or know where to start ?

          C Offline
          C Offline
          Chatura Dilan
          wrote on last edited by
          #4

          Or you can use .NET components such as FileListBox, DirListBox, DriveListBox chatura

          1 Reply Last reply
          0
          • I ibexcentral

            Is it possible to fix the directory of the File Open/Save dialog and NOT allow the user to change it ? For example: c:\fixeddiretory

            C Offline
            C Offline
            CooperWu
            wrote on last edited by
            #5

            I suggest you that add a form for this function. Add some controls on it. Then, you can do anything you want.

            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