Compartilhar via


AddDesktopComponent method

Adds a Web site or image to the Microsoft Active Desktop.

This method is not supported for Windows apps using JavaScript.

Syntax

HRESULT retVal = object.AddDesktopComponent(URL, Type, Left, Top, Width, Height);

Parameters

URL [in]

Type: BSTR

A BSTR that specifies the location of the Web site or image to be added to the Active Desktop.

Type [in]

Type: BSTR

A BSTR containing one of the following values that specify the type of item to add.

image

Specifies the component is an image.

website

Specifies the component is a Web site.

Left [in, optional]

Type: VARIANT

A pointer to a VARIANT of type VT_I4 that specifies the position of the left edge, in screen coordinates.

Top [in, optional]

Type: VARIANT

A pointer to a VARIANT of type VT_I4 that specifies the position of the top edge, in screen coordinates.

Width [in, optional]

Type: VARIANT

A pointer to a VARIANT of type VT_I4 that specifies the width, in screen units.

Height [in, optional]

Type: VARIANT

A pointer to a VARIANT of type VT_I4 that specifies the height, in screen units.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Standards information

There are no standards that apply here.

Remarks

The user must have Active Desktop installed for this method to work. If Active Desktop is not installed, this method is not invoked.

This method is not supported in HTML Applications (HTAs).