Méthode IShellDispatch.Explore

Ouvre un dossier spécifié dans une fenêtre windows Explorer.

Syntaxe

IShellDispatch.Explore(
  vDir
)

IShellDispatch.Explore( _
  ByVal vDir As Variant _
)

Paramètres

vDir [in]

Type : Variant

Dossier à afficher. Il peut s’agir d’une chaîne qui spécifie le chemin d’accès du dossier ou l’une des valeurs ShellSpecialFolderConstants . Notez que les noms de constantes trouvés dans ShellSpecialFolderConstants sont disponibles en Visual Basic, mais pas en VBScript ou JScript. Dans ce cas, les valeurs numériques doivent être utilisées à leur place.

Valeur retournée

JScript

Cette méthode ne retourne pas de valeur.

VB

Cette méthode ne retourne pas de valeur.

Notes

Cette méthode est implémentée et accessible via la méthode Shell.Explore .

Exemples

Les exemples suivants montrent l’utilisation d’Explorer dans JScript, VBScript et Visual Basic.

Jscript:

<script language="JScript">
    function fnShellExploreJ()
    {
        var objShell = new ActiveXObject("shell.application");
        
        objshell.Explore("C:\\");
    }
</script>

Vbscript:

<script language="VBScript">
    function fnShellExploreVB()
        dim objShell
        dim ssfWINDOWS
        ssfWINDOWS = 36

        set objShell = CreateObject("shell.application")
        objshell.Explore(ssfWINDOWS)

        set objShell = nothing
    end function
 </script>

Visual Basic :

Private Sub fnShellExploreVB()
    Dim objShell As Shell

    Set objShell = New Shell
    objshell.Explore (ssfPERSONAL)

    Set objShell = Nothing
End Sub

Spécifications

Condition requise Valeur
Client minimal pris en charge
Windows 2000 Professionnel, Windows XP [applications de bureau uniquement]
Serveur minimal pris en charge
Windows 2000 Server [applications de bureau uniquement]
En-tête
Shldisp.h
IDL
Shldisp.idl
DLL
Shell32.dll (version 4.71 ou ultérieure)