shell ile ilgili bir komut

20/04/2012, 00:19

accessman

bu ne işe yarıyor
Kod:
Option Explicit

'========================================================
'   API declaration
'========================================================
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 Form_Load()
    Dim sFile As String
    Dim sCommand As String
    Dim sWorkDir As String
    
    sFile = "C:\albums\index.html"  'The file to execute
    sCommand = vbNullString         'Command line parameters
    sWorkDir = "C:\albums"          'The working directory

    ShellExecute hwnd, "open", sFile, sCommand, sWorkDir, 1
End Sub
20/04/2012, 00:42

alpeki99

sFile değişkenindeki dosyayı varsayılan Internet tarayıcınızda açmaya yarar. Yani varsayılan tarayıcınız Firefox ise C:\Albums\index.html isimli dosyayı Firefox içinde görmenizi sağlar.
20/04/2012, 00:46

accessman

teşekkürler