·  Start ·  Programme ·  Codes ·  Tipps ·  ActiveX ·  Tutorials · 



Ganz einfach kann man den Explorer mit einem vorgegebenen Pfad aufrufen.

Private Declare Function ShellExecute Lib "shell32.dll" Alias _
    "ShellExecuteA" (ByVal hWnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) _
As Long

Private Sub Command1_Click()
' Öffnet den Explorer und markiert das gewünschte
' Verzeichnis
    ShellExecute Me.hWnd, "explore", "D:\Programme", _
    vbNullString, vbNullString, 1
' oder auch
    'Shell "explorer.exe /n,/e,/select,D:\programme", 1
End Sub

Private Sub Command2_Click()
' Markiert eine Datei im Explorer
    Shell "explorer.exe /n,/e,/select,D:\test.txt", 1
End Sub
Aktualisiert: 12.02.2008, 14:10 Uhr Copyright © 2001 - 2010 by ST-software Navigation zurück  |  Navigation vorwärts  |  Zum Seitenanfang     
Ihre IP: 38.107.191.84 ·  Seite erstellt in: 0.428 Sekunden ·  Dateigröße:  2703 Bytes