Share via


_CommandBarButton.Mask Property

Returns or sets an IPictureDisp object that represents the mask image of a _CommandBarButton object.

Namespace:  Microsoft.Office.Core
Assembly:  office (in office.dll)

Syntax

'Declaration
Property Mask As IPictureDisp
    Get
    Set
'Usage
Dim instance As _CommandBarButton
Dim value As IPictureDisp

value = instance.Mask

instance.Mask = value
IPictureDisp Mask { get; set; }

Property Value

Type: IPictureDisp

Remarks

The mask image determines what parts of the button image are transparent.

When you create an image that you plan on using as a mask image, all of the areas that you want to be transparent should be white, and all of the areas that you want to show should be black.

Always set the mask after you have set the picture for a CommandBarButton object.

See Also

Reference

_CommandBarButton Interface

_CommandBarButton Members

Microsoft.Office.Core Namespace