Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
Recupera un objeto que representa el elemento primario del objeto actual.
Esta propiedad es de solo lectura.
Sintaxis
objParent = IShellDispatch.Parent
Property Parent As Object
Valor de propiedad
Variable de tipo IDispatch que recibe el objeto primario.
Comentarios
Esta propiedad se implementa y se accede a ella a través de la propiedad Shell.Parent .
Ejemplos
En los ejemplos siguientes se muestra el uso de Parent en JScript, VBScript y 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
Requisitos
| Requisito | Value |
|---|---|
| Cliente mínimo compatible |
Windows 2000 Professional, Windows XP [solo aplicaciones de escritorio] |
| Servidor mínimo compatible |
Windows 2000 Server [solo aplicaciones de escritorio] |
| Encabezado |
|
| IDL |
|
| Archivo DLL |
|