Results 1 to 3 of 3

Thread: Opening multiple files at once

  1. #1

    Thread Starter
    Hyperactive Member wordracr's Avatar
    Join Date
    Aug 2001
    Posts
    281

    Opening multiple files at once

    How would this be possible (with the common dialog box)

    I know other programs let you select more than one file from the dialog box. How would you do this in vb? I tried clicking with control held down, but that didn't work.


    Also, is there a way you can resize a picture box at runtime with the mouse? Or does anyone know of a control that would let you do this?

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    cd1.Flags = cdlOFNExplorer Or cdlOFNAllowMultiselect Or cdlOFNHideReadOnly ' yah this makes it multiselect

    cd1.MaxFileSize = 2048 'allots more space for the extra filenames so it doesnt run out.

    CD1. is the common dialog
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    o yeh and to read it after:

    VB Code:
    1. If InStr(cd1.FileName, vbNullChar) = 0 Then List1.AddItem cd1.FileName
    2. With cd1
    3. iCounter = 1
    4.         sfolder = Mid(.FileName, 1, InStr(iCounter, .FileName, vbNullChar) - 1)
    5.         Do Until InStr(iCounter + 1, .FileName, vbNullChar) = 0
    6.             iCounter = InStr(iCounter + 1, .FileName, vbNullChar) + 1
    7.             If InStr(iCounter, .FileName, vbNullChar) = 0 Then
    8.                 List1.AddItem sfolder & "\" & Mid(.FileName, iCounter)
    9.             Else
    10.                 List1.AddItem sfolder & "\" & Mid(.FileName, iCounter, InStr(iCounter + 1, .FileName, vbNullChar) - iCounter)
    11.             End If
    12.         Loop
    13.  
    14. End With
    v
    Remember, if someone's post was not helpful, you can always rate their post negatively .

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