Thread: how to display selected directory in browse folder dialog?

  1. #16
    Registered User
    Join Date
    Oct 2008
    Posts
    85
    care to elaborate a little Magos

    would he be looking at adding an event here to capture any mouse interaction on that dialog and then modify the property of the 'Description' string?

    im curious now too.

  2. #17
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    If no C# functions exists for this (All forms usually have a Controls attribute, but the special dialogs seems to lack it) then you could write a DllImport extern function for these operations: http://www.codeproject.com/KB/dialog/EnumControls.aspx

    ...or something. What do I know, I'd never try to break an existing class beyond what it was meant to do
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #18
    Registered User
    Join Date
    Aug 2008
    Posts
    188
    i have a feeling you won't be able to change it. something as 'simple' as this should very quick to figure out if it's possible or not. and it looks like it's not possible.

    you could try the win32 call to SHBrowseForFolder(...)
    check this out: http://pinvoke.net/default.aspx/shel...ForFolder.html

  4. #19
    Registered User
    Join Date
    Aug 2008
    Posts
    188
    yeah, SHBrowseForFolder works. the sample code on pinvoke.net isn't 100% working. you need to fix up the OnBrowseEvent method, and add another p/invoke signature for SHGetPathFromIDListW and you're set!

  5. #20
    Registered User
    Join Date
    Nov 2008
    Posts
    222

    Question

    A refresh of the node and key-list is required if a new director has been selected.
    So i need to add an event here to capture any mouse interaction on that dialog and then modify the property of the 'Description' string\property?
    Is there any event handler which does this functionality?

  6. #21
    Registered User
    Join Date
    Feb 2010
    Posts
    1
    The FolderBrowserDialog is very inflexible and cannot do what you want. An alternative FolderBrowserDialog exists in Shell MegaPack : (Windows Explorer-Like File & Folder Browser Controls & Components For .Net, WPF & ActiveX)) which can do this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  2. User Choosing Directory Dialog Box
    By Macromatt in forum Windows Programming
    Replies: 4
    Last Post: 01-19-2002, 11:57 PM
  3. dialog box: open folder : how to?
    By toby1909 in forum C++ Programming
    Replies: 2
    Last Post: 01-16-2002, 05:18 AM
  4. create a dialog box to open folder: how to?
    By toby1909 in forum Windows Programming
    Replies: 5
    Last Post: 01-13-2002, 01:49 PM
  5. Dialog Display
    By CodeMonkey in forum Windows Programming
    Replies: 2
    Last Post: 11-20-2001, 05:55 PM