Results 1 to 5 of 5

Thread: Common Dialog Box 's InitDir property

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    Hey all.

    Anybody had this problem?

    I have a common dialog box for opening jpg files.

    I have specified at design time and at run time the initial directory. but when the application runs, it always opens to the current directory (app.path)

    As I said, i set the property on the control's property box and then I even added a line to the Form_Load:

    cdbOpenPic.InitDir = "C:\my folder\jpgs\"

    Still, it opens in the app.path


    So, anybody know why?

  2. #2
    Guest
    I have no problem, but are you displaying the correct folder path?

  3. #3

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    Sorry? displaying where?

    WHen the cdb opens, the Look In: folder is vb98 ( in the vbp version of the app) and the app.path (in the exe version).

    I just don't see why the cdb doesnt open to the folder that I typed in as the initial directory in the control's properties box.

  4. #4
    Guest
    This code works for me:

    Code:
    'CommonDialog1.InitDir = "C:\my folder\jpgs\"
    CommonDialog1.InitDir = "C:\Windows\System\"
    What I mean is, are you stating the right folder? Perhaps its myfolder\jpgs and not my folder\jpgs?

  5. #5

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    no it wasn't. I'm retarded.


    there was no space in the actual pathname, it just looked like it.

    When I pasted the pathname into the code, it worked fine.

    Thanks so much.

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