I
i980565
Hi everyone,
I'm trying to create my own file explorer (or however you want to call
it). I already created a drvlistbox, a dirlistbox, a filelistbox, a
textbox (to specify *.*), 3 labels (displaying the path, etc.) and a
button (which will perform the *.*). I now want to include either a
button which will open the selected file, or just the possibility to
dblclick on the file to open it. However, I have no clue how to do this.
Could somebody help me out with this (I would appreciate it if you are
as specific as possible, I'm only a beginner!).
This is my code untill now!
Private Sub Form_Load()
With lblTitle
.Caption = "DRIVE LIST BROWSER"
.FontSize = 14
.ForeColor = &HFF&
.Alignment = 2
End With
With lblNumFiles
'total number of elements inside the list..
.Caption = FilList.ListCount & " files"
.FontBold = True
.WordWrap = True
End With
With lblExtension
.Caption = "Type of File to View"
.FontBold = True
End With
With TxtExtension
.Text = "*.*"
.FontBold = True
End With
DirDirectory.Path = "D:\database\Brieven\"
CmdExtension.Caption = "&View"
End Sub
----
Private Sub drvFile_Change()
Dim Msg, Msg1 As String
Msg = "Please insert disc inside A:\"
Msg1 = "Please insert CD ROM"
On Error GoTo IF_FILE_NOT_THERE
DirDirectory.Path = drvfile.Drive
Exit Sub
IF_FILE_NOT_THERE:
Select Case drvfile.Drive
Case "a:": MsgBox Msg, , "No A:\ DRIVE"
Case "d:": MsgBox Msg1, , "No CD ROM"
End Select
drvfile.Drive = DirDirectory.Path
End Sub
---
Private Sub dirDirectory_Change()
FilList.Path = DirDirectory.Path
lblNumFiles.Caption = FilList.ListCount _
& " files in " & DirDirectory.Path
End Sub
----
Private Sub cmdExtension_Click()
If (Left(TxtExtension.Text, 2)) <> "*." _
Or Len(TxtExtension.Text) = 0 Then
MsgBox "Just add extension"
TxtExtension.Text = "*."
TxtExtension.SelStart = 2
Else
FilList.Pattern = TxtExtension.Text
End If
End Sub
---
Private Sub button1_Click()
????????????
End Sub
----
and/or
---
filllist??
OK, this is my code, hopefully could help me out!!
Thanx
I'm trying to create my own file explorer (or however you want to call
it). I already created a drvlistbox, a dirlistbox, a filelistbox, a
textbox (to specify *.*), 3 labels (displaying the path, etc.) and a
button (which will perform the *.*). I now want to include either a
button which will open the selected file, or just the possibility to
dblclick on the file to open it. However, I have no clue how to do this.
Could somebody help me out with this (I would appreciate it if you are
as specific as possible, I'm only a beginner!).
This is my code untill now!
Private Sub Form_Load()
With lblTitle
.Caption = "DRIVE LIST BROWSER"
.FontSize = 14
.ForeColor = &HFF&
.Alignment = 2
End With
With lblNumFiles
'total number of elements inside the list..
.Caption = FilList.ListCount & " files"
.FontBold = True
.WordWrap = True
End With
With lblExtension
.Caption = "Type of File to View"
.FontBold = True
End With
With TxtExtension
.Text = "*.*"
.FontBold = True
End With
DirDirectory.Path = "D:\database\Brieven\"
CmdExtension.Caption = "&View"
End Sub
----
Private Sub drvFile_Change()
Dim Msg, Msg1 As String
Msg = "Please insert disc inside A:\"
Msg1 = "Please insert CD ROM"
On Error GoTo IF_FILE_NOT_THERE
DirDirectory.Path = drvfile.Drive
Exit Sub
IF_FILE_NOT_THERE:
Select Case drvfile.Drive
Case "a:": MsgBox Msg, , "No A:\ DRIVE"
Case "d:": MsgBox Msg1, , "No CD ROM"
End Select
drvfile.Drive = DirDirectory.Path
End Sub
---
Private Sub dirDirectory_Change()
FilList.Path = DirDirectory.Path
lblNumFiles.Caption = FilList.ListCount _
& " files in " & DirDirectory.Path
End Sub
----
Private Sub cmdExtension_Click()
If (Left(TxtExtension.Text, 2)) <> "*." _
Or Len(TxtExtension.Text) = 0 Then
MsgBox "Just add extension"
TxtExtension.Text = "*."
TxtExtension.SelStart = 2
Else
FilList.Pattern = TxtExtension.Text
End If
End Sub
---
Private Sub button1_Click()
????????????
End Sub
----
and/or
---
filllist??
OK, this is my code, hopefully could help me out!!
Thanx