|
-
Sep 5th, 2005, 04:09 PM
#1
Re: CommonDialog Control Multi Select
I'm not sure what you mean, but here's the routine that I use:
VB Code:
Private Sub cmdOpen_Click()
' CancelError is True.
On Error GoTo ErrHandler
' Set Flags
CommonDialog1.Flags = cdlOFNAllowMultiselect Or cdlOFNLongNames
' Set filters.
CommonDialog1.Filter = "All Files (*.*)|*.*|Text" & _
"Files (*.txt)|*.txt|Batch Files (*.bat)|*.bat"
' Specify default filter.
CommonDialog1.FilterIndex = 2 ' Picks TEXT as default
' Display the Open dialog box.
CommonDialog1.ShowOpen
' Call the open file procedure.
' OpenFile (CommonDialog1.FileName)
Exit Sub
ErrHandler:
' User pressed Cancel button.
Exit Sub
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.
-
Sep 5th, 2005, 05:58 PM
#2
Re: CommonDialog Control Multi Select
Is there any way I can change the interface for that thou?
There are two basic interfaces to the ShowOpen method. The one shown depends on the inclusion of the cdlOFNExplorer flag.
CommonDialog1.Flags = cdlOFNAllowMultiselect Or cdlOFNLongNames Or cdlOFNExplorer
There are other flags that let you manipulate the interface
cdlOFNHelpButton - adds a Help button
cdlOFNHideReadOnly - hide the "Open as ReadOnly" checkbox.
-
Sep 5th, 2005, 06:01 PM
#3
Thread Starter
Member
Re: CommonDialog Control Multi Select
Ok Thanks!
Thanks
SgtSlayer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|