Propriété IShellDispatch.Parent
Récupère un objet qui représente le parent de l’objet actuel.
Cette propriété est en lecture seule.
Syntaxe
objParent = IShellDispatch.Parent
Property Parent As Object
Valeur de la propriété
Variable de type IDispatch qui reçoit l’objet parent.
Notes
Cette propriété est implémentée et accessible via la propriété Shell.Parent .
Exemples
Les exemples suivants montrent l’utilisation de Parent dans JScript, VBScript et Visual Basic.
Jscript:
<script language="JScript">
function fnShellParentJ()
{
var objShell = new ActiveXObject("shell.application");
var objParent;
objParent = objshell.Shell_Parent;
if (objParent != null)
{
alert("Got parent property");
}
}
</script>
Vbscript:
<script language="VBScript">
function fnShellParentVB()
dim objShell
set objShell = CreateObject("shell.application")
if (not objShell is nothing) then
dim objParent
set objParent = objshell.Parent
if (not objParent is nothing) then
alert("Got parent property")
end if
set objParent = nothing
end if
set objShell = nothing
end function
</script>
Visual Basic :
Private Sub fnShellParentVB()
Dim objShell As Shell
Set objShell = New Shell
If (Not objShell Is Nothing) Then
Dim objParent As Object
Set objParent = objshell.Parent
If (Not objParent Is Nothing) Then
Debug.Print "Got parent object"
End If
Set objParent = Nothing
End If
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 |
|
IDL |
|
DLL |
|
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour