Results 1 to 10 of 10

Thread: CommonDialog control - stop user navigating? [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213

    CommonDialog control - stop user navigating? [RESOLVED]

    Hi all, hope you're well.

    With the CommonDialog control set to open the "Open" dialog, is it possible (with flags or APIs) to stop the user from navigating to(and as a result selecting) to anywhere BUT the default directory it goes to?

    If this is not possible, is there any other way to display the contents of a folder (a special folder at that - the Network Neighbourhood folder (::{208D2C60-3AEA-1069-A2D7-08002B30309D})) and have an item selected?
    Last edited by Xenonic_Rob; Jan 7th, 2003 at 01:10 PM.

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Try passing in cdlOFNNoChangeDir as one of the Flags.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213
    From MSDN:
    cdlOFNNoChangeDir - Forces the dialog box to set the current directory to what it was when the dialog box was opened.
    So that doesn't work unfortunately.

    Probs best if I restate the problem. I want users to be able to use the common Windows interface of Network Neighbourhood to select a Computer on the LAN. Now, I don't think CommonDialog will actually let the computer itself be selected... so... any ideas?

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  4. #4
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    Why show a save box if the user can't change the directory?

    I'd just ask for a file name and save it.

  5. #5

    Thread Starter
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213
    If you read my post, you'd see why your post is not relevant:

    Probs best if I restate the problem. I want users to be able to use the common Windows interface of Network Neighbourhood to select a Computer on the LAN. Now, I don't think CommonDialog will actually let the computer itself be selected... so... any ideas?

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  6. #6

  7. #7

    Thread Starter
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213
    And that will work with Computers in a LAN in Network Neighbourhood? How would I go about doing that?

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  8. #8

  9. #9

    Thread Starter
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213
    I dont want to view the drives of the LAN'ed computer - i want to select the computer itself.

    Just to view a list of the computers in the same way Network Neighbourhood does... with that GUI kinda.

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  10. #10
    New Member
    Join Date
    Sep 2002
    Location
    china
    Posts
    10
    Dim bi As BROWSEINFO
    bi.ulFlags = BIF_BROWSEFORCOMPUTER
    bi.hOwner = Me.hWnd
    bi.lpszTitle = "select a computer"
    SHBrowseForFolder bi

    do you like this?

    i forget this

    shbrowseforfolder is a api in "shell32.dll"
    Last edited by woodwell; Jan 6th, 2003 at 07:59 PM.

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