Beispiel für einen kleinen Verzeichnis und Dateianzeiger.






Option Explicit


Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Command2_Click()
Shell "notepad " & Label1.Caption, vbNormalFocus
End Sub

Private Sub Dir1_Change()
File1.Path = Dir1.Path
Label1.Caption = ""
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
Label1.Caption = ""
End Sub

Private Sub File1_Click()
LabelCaption
End Sub

Private Sub File1_DblClick()
Shell "notepad " & Label1.Caption, vbNormalFocus End Sub

Private Sub File1_KeyDown(KeyCode As Integer, Shift As Integer)
LabelCaption
End Sub

Private Sub LabelCaption()
If Right$(Dir1.Path, 1) = "\" Then
Label1.Caption = Dir1.Path & File1.FileName
Else
Label1.Caption = Dir1.Path & "\" & File1.FileName
End If
End Sub