Results 1 to 6 of 6

Thread: [2005] OpenFileDialog used to open directory...

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2007
    Posts
    38

    [2005] OpenFileDialog used to open directory...

    Does anyone know of any good way to make the OpenFileDialog open a directory instead of the file? I've seen it done with many programs, but can't seem to figure it out.

    And YES I do know about the FolderBrowserDialog control, but I HATE it's interface, and I want the user to be able to type in the path if they want to.

    I've tried making an extended class... but with no luck.

    Thanks

  2. #2
    Hyperactive Member
    Join Date
    Dec 2004
    Posts
    326

    Re: [2005] OpenFileDialog used to open directory...

    It was one of those, read better and wish there was a post delete, posts :/

    Although I did find this article which may help or may not.

    http://www.codeproject.com/cs/miscct...leDialogEx.asp
    Last edited by zalez; Aug 7th, 2007 at 08:47 PM.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2007
    Posts
    38

    Re: [2005] OpenFileDialog used to open directory...

    That is some help... I'll look into it deeper.

    The main reason I want to be able to type the path in is because if it's a network share that requires a username and password, a windows prompt comes up and it basically does a "ghost" mapping (without a drive letter) to that share for later access. My main problem is that I couldn't find any information to do this prompting for credentials myself, so this is my only solution...

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [2005] OpenFileDialog used to open directory...

    The usual solution is to create a textbox that allows the user to type in a path, with a "Browse" button to its right that invokes a FolderBrowserDialog.
    Whilst you might dislike the interface of the dialog, I think it is advisable to accede to convention in such cases. Consistency is paramount in user interfaces; users tend to dislike applications that do not match the look and feel of the rest of the operating system.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2005] OpenFileDialog used to open directory...

    Quote Originally Posted by zalez
    It was one of those, read better and wish there was a post delete, posts :/

    Although I did find this article which may help or may not.

    http://www.codeproject.com/cs/miscct...leDialogEx.asp
    All you have to do is click the Edit button next to your post to delete. Then select the radi0 button designating you want to delete and then click Delete, but only for members with 2048+ posts.
    Last edited by RobDog888; Aug 8th, 2007 at 04:40 AM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Member
    Join Date
    Aug 2007
    Posts
    38

    Re: [2005] OpenFileDialog used to open directory...

    Thanks for the reply, penagate. The main problem I'm having with the browse folder dialog is that if the user types in the path (as you have said), I want a prompt to "silently" map that share for use until the computer is restarted (just like if you go Start > Run > \\pcname\share then type in credentials. That share will be accessible until you restart the computer, which is when you'll have to re-type the credentials. Any ideas to get THAT to work? Thanks

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