paolo
Nov 16th, 1999, 09:39 PM
How can I change the color of the scrollbar of a filelistbox without having to change system colors?
How I can hide the extensions of the listed files?
Thanks in advance.
Paolo
paolo.airasca@isiline.it
Yonatan
Nov 16th, 1999, 10:00 PM
You can't change the color of the scrollbar without changing system colors...
(Ok, maybe you can but it's very difficult)
This is how you can hide the extensions:
First, create a FileListBox (File1) and a ListBox (List1), then add this code:
Option Explicit
Private Function LastInStr(ByVal String1 As String, ByVal String2 As String, Optional ByVal Start As Long = 0, Optional Compare As VbCompareMethod = vbBinaryCompare) As Long
LastInStr = Start
While InStr(LastInStr + 1, String1, String2, Compare)
LastInStr = InStr(LastInStr + 1, String1, String2, Compare)
Wend
End Function
Private Sub CopyLists(lstBoxDest As ListBox, filListBoxSrc As FileListBox)
Dim I As Integer, S As String
Call lstBoxDest.Clear
For I = 0 To filListBoxSrc.ListCount - 1
S = filListBoxSrc.List(I)
S = Left(S, LastInStr(S, ".") - 1)
Call lstBoxDest.AddItem(S)
Next
End Sub
Private Sub File1_PathChange()
Call CopyLists(List1, File1)
End Sub
Private Sub File1_PatternChange()
Call CopyLists(List1, File1)
End Sub
Private Sub Form_Load()
Dim I As Long
File1.Visible = False
Call CopyLists(List1, File1)
End Sub
------------------
Yonatan
Teenage Programmer
E-Mail: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)
AIM: RYoni69