A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.
[Visual Basic .NET] Public ReadOnly Property Object As Object
[C#] public object Object {get;}
[C++]
HRESULT get_Object(
IDispatch** ppDispatch
);
[C++]Parameters
ppDispatch [out, retval] ppDispatch is a parameter of type IDispatch*
Product Availability
Description
In some development environments it is not possible to query interface directly on the control to other COM interfaces, beacuse the control is contained within a wrapper object. To get the real control use the Object property.
When querying interface to IPageLayoutControl2 in Visual Basic .NET or Visual C# .NET the Object property or container specific code must be used. This is because .NET contains the real control inside a wrapper object known as an host.
IPageLayoutControl2 pageLayoutControl = axPageLayoutControl1.Object as IPageLayoutControl2;
When querying interface to IPageLayoutControl2 in Visual Basic .NET or Visual C# .NET the Object property or container specific code must be used. This is because .NET contains the real control inside a wrapper object known as an host.
Dim pageLayoutControl As IPageLayoutControl2 = AxPageLayoutControl1.Object