Results 1 to 8 of 8

Thread: Long Filenames?

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    33

    Angry

    Is there any way to have multiple file selection and have long filenames returned with the open dialog box?

  2. #2
    Guest
    Code:
    CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNLongNames

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    33
    this doesnt seem to be working for me, is it just me what could i be doing wrong

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    Works for me as well....

    Private Sub Form_Load()
    'display the commondialog show open
    On Error GoTo QuitNow:
    CommonDialog1.InitDir = "C:\" 'set dir path
    CommonDialog1.CancelError = True 'used in cancel code
    CommonDialog1.Filter = "All files(*.*)|*.*" 'filter for all files
    CommonDialog1.Flags = cdlOFNAllowMultiselect + cdlOFNLongNames
    CommonDialog1.ShowOpen
    'show files
    QuitNow:
    Exit Sub


    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5
    Member
    Join Date
    Sep 2000
    Location
    Kentucky
    Posts
    56

    Long Filenames and Multiselect

    The problem with this is that the filenames are delimited by spaces. This makes it difficult to separate the filenames (it is likely that you will run into a filename with a space in it).

    If someone has a solution to this problem please help me out. It has me stumped right now.

  6. #6
    Lively Member
    Join Date
    May 1999
    Location
    Singapore
    Posts
    116
    multi select file names separated by ;
    YC Sim
    Teenage Programmer
    UIN 37903254



  7. #7
    Member
    Join Date
    Sep 2000
    Location
    Kentucky
    Posts
    56
    OK, I figured it out.

    I am using API on Windows NT. API (WinNT) delimits with vbNull. Like this: "path(vbNull)filename1(vbNull)filename2(vbNull)..."

    I think the delimiter varies with OS.

    I will have to test my program on Win9x to see if the delimiter is the same.

    All the documentation I read said that the MultiSelect was delimited by spaces.

    Thank you.

  8. #8
    Lively Member
    Join Date
    May 1999
    Location
    Singapore
    Posts
    116
    i think it is delimited by a ; semicolon..
    YC Sim
    Teenage Programmer
    UIN 37903254



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