| Mirage Source http://www.miragesource.net/forums/ |
|
| Re: Browse http://www.miragesource.net/forums/viewtopic.php?f=201&t=2697 |
Page 1 of 1 |
| Author: | William [ Sat Sep 15, 2007 1:54 pm ] |
| Post subject: | Re: Browse |
How do I open multiple files using the commong dialog control? I can just manage to open one at a time. My code: Code: Private Sub add_Click()
Dim sFile As String With dlgCommonDialog .DialogTitle = "Open" .CancelError = False .Filter = "mp3 Files (*.mp3)|*.mp3|" .ShowOpen If Len(.FileName) = 0 Then Exit Sub End If sFile = .FileName Dim i As Byte, a As Byte, b As Byte, c As Byte, FileLength As Byte a = 0 For i = 1 To Len(.FileName) If Mid(.FileName, i, 1) = "\" Then a = a + 1 Else b = b + 1 End If Next i For i = 1 To Len(.FileName) If Mid(.FileName, i, 1) = "\" Then c = c + 1 If c = a Then FileLength = Len(.FileName) - i End If 'Else ' b = b + 1 End If Next i List2.AddItem Mid(.FileName, (Len(.FileName) - FileLength) + 1, Len(.FileName)) 'For i = (Len(.FileName) - FileLength) To Len(.FileName) 'Next i List1.AddItem .FileName End With End Sub |
|
| Author: | Robin [ Sat Sep 15, 2007 1:55 pm ] |
| Post subject: | Re: Browse |
| Author: | William [ Sat Sep 15, 2007 2:05 pm ] |
| Post subject: | Re: Browse |
Yeah sure. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|