Results 1 to 7 of 7

Thread: [RESOLVED] CommonDialog Control Multi Select

Threaded View

  1. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: CommonDialog Control Multi Select

    I'm not sure what you mean, but here's the routine that I use:
    VB Code:
    1. Private Sub cmdOpen_Click()
    2.   ' CancelError is True.
    3.    On Error GoTo ErrHandler
    4.    ' Set Flags
    5.     CommonDialog1.Flags = cdlOFNAllowMultiselect Or cdlOFNLongNames
    6.    ' Set filters.
    7.    CommonDialog1.Filter = "All Files (*.*)|*.*|Text" & _
    8.       "Files (*.txt)|*.txt|Batch Files (*.bat)|*.bat"
    9.    ' Specify default filter.
    10.    CommonDialog1.FilterIndex = 2 ' Picks TEXT as default
    11.    ' Display the Open dialog box.
    12.    CommonDialog1.ShowOpen
    13.    ' Call the open file procedure.
    14.  '  OpenFile (CommonDialog1.FileName)
    15.    Exit Sub
    16.  
    17. ErrHandler:
    18. ' User pressed Cancel button.
    19.    Exit Sub
    20.  
    21. End Sub

    Filename returns this, you'd have to split() on the space between names.
    D:\VISUAL~2\C\CDCSHO~1\ CDCSHO~1.ZIP form1.frm form1.frx Project1.vbp Project1.vbw
    Last edited by dglienna; Sep 5th, 2005 at 04:12 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