|
-
Oct 11th, 2005, 12:57 PM
#1
[RESOLVED] File Listbox... exclude?
Is there a way to exclude types in the filter in a filelistbox?
like <> *.log ?
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Oct 11th, 2005, 12:57 PM
#2
Re: File Listbox... exclude?
Wouldn't is be simpler to just include what you do want?
-
Oct 11th, 2005, 01:00 PM
#3
Re: File Listbox... exclude?
no.. I need ALL but *.log
so.. my thinking is that would be a LOOONG filter string
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Oct 11th, 2005, 01:03 PM
#4
Re: File Listbox... exclude?
Well, File1.Pattern throws up all over the place if you try a put anything on it except an equal sign.
I don't know what the common dialog would do. I'll test it out and see what happens.
-
Oct 11th, 2005, 01:05 PM
#5
Re: File Listbox... exclude?
.. needs to be a listbox..
I'll just use a reg one an add to it as I loop through the files.. (I guess)
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Oct 11th, 2005, 01:07 PM
#6
Re: File Listbox... exclude?
 Originally Posted by [A51g]Static
Is there a way to exclude types in the filter in a filelistbox?
like <> *.log ?
 Originally Posted by [A51g]Static
.. needs to be a listbox..
You are confusing me. Are you using a filelistbox or a listbox?
-
Oct 11th, 2005, 01:52 PM
#7
Re: File Listbox... exclude?
I was using a FileListBox... but If I switch to a reg listbox I can filter them out myself
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Oct 11th, 2005, 04:42 PM
#8
Re: File Listbox... exclude?
You can also filter using a filelistbox. eg:
VB Code:
File1.Pattern = "*.log;*.mdb"
-
Oct 12th, 2005, 06:07 AM
#9
Re: File Listbox... exclude?
 Originally Posted by [A51g]Static
I was using a FileListBox... but If I switch to a reg listbox I can filter them out myself
So, is this fixed or are you still having a problem?
-
Oct 12th, 2005, 07:32 AM
#10
Re: File Listbox... exclude?
yep go it working... thanks
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Nov 22nd, 2014, 08:42 AM
#11
New Member
Re: [RESOLVED] File Listbox... exclude?
For VB6 we had to switch to a ListView in place of FileList to get a solution ... here's the code:
Code:
' get the list of excluded files
Private Sub GetExcludedFiles(ByVal fileSelFile As ListView)
Dim i As Long, names() As String
names() = GetFiles("*.*")
For i = 1 To UBound(names)
tmp2 = LCase$(GetExtension(names(i)))
If Not ((tmp2 = "exe") Or (tmp2 = "exp") Or (tmp2 = "obj") _
Or (tmp2 = "for") Or (tmp2 = "lst") Or (tmp2 = "xmp") Or (tmp2 = "sld") _
Or (tmp2 = "fc") Or (tmp2 = "fc0") Or (tmp2 = "graf") Or (tmp2 = "demo") _
Or (tmp2 = "inc") Or (tmp2 = "bat") Or (tmp2 = "ktl") Or (tmp2 = "eer") _
Or (tmp2 = "doc") Or (tmp2 = "rtf") Or (tmp2 = "jpg") Or (tmp2 = "gif") _
) Then
With fileSelFile.ListItems.Add(, , names(i)).ListSubItems
End With
End If
Next
-
Nov 24th, 2014, 05:37 AM
#12
Re: [RESOLVED] File Listbox... exclude?
OptimalDesigns, the original poster had already found the solution to their problem and while you have suggested another solution to the problem the original poster posted the nine years ago.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
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
|