_FormRegionStartup.GetFormRegionIcon Method

Obtains an icon image that will be displayed for a particular type of icon for the form region.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Function GetFormRegionIcon ( _
    FormRegionName As String, _
    LCID As Integer, _
    Icon As OlFormRegionIcon _
) As Object
'Usage
Dim instance As _FormRegionStartup
Dim FormRegionName As String
Dim LCID As Integer
Dim Icon As OlFormRegionIcon
Dim returnValue As Object

returnValue = instance.GetFormRegionIcon(FormRegionName, _
    LCID, Icon)
[DispIdAttribute()]
Object GetFormRegionIcon(
    string FormRegionName,
    int LCID,
    OlFormRegionIcon Icon
)

Parameters

  • FormRegionName
    Type: System.String

    The name of the form region which is the name used when registering the form region in the Windows registry.

  • LCID
    Type: System.Int32

    The locale ID that identifies the language that Outlook is currently using. This value is used to obtain the localization strings corresponding to this language for the form region.

Return Value

Type: System.Object
An Object that is either a byte-array that represents the original bytes of the image file or an IPictureDisp object.

Remarks

This method is intended to be implemented by an add-in and called by Outlook. As part of the FormRegionStartup interface, this method and the GetFormRegionManifest method provide a mechanism through which an add-in can register a form region and provide Outlook with the XML manifest and the icons for the form region.

If you would like an add-in to provide icons for a form region, specify the ProgID of the add-in when you register the form region in the Windows registry. For more information on registering a form region, see Specifying Form Regions in the Windows Registry. The add-in must implement the GetFormRegionManifest and the GetFormRegionIcon methods of the FormRegionStartup interface.

In the XML manifest for the form region, under the icons element, specify the value addin for each of the child elements where you would like to use a custom icon. Implement GetFormRegionIcon such that when Outlook passes that type of icon as an argument for Icon, GetFormRegionIcon returns the image of the custom icon. If you want Outlook to display the default icon, implement GetFormRegionIcon such that it returns Nothing (a null reference (Nothing in Visual Basic) in C#) for that type of icon. GetFormRegionIcon should also return Nothing (a null reference (Nothing in Visual Basic) in C#) when Icon is olFormRegionIconDefault.

When Outlook starts, it reads the list of form regions from the Windows registry and caches the data associated with the form regions. If a form region has been registered with a ProgID, Outlook will resort to the corresponding add-in by calling its implementation of GetFormRegionIcon for any icon in the XML manifest that has addin as the value of a child element of the icons element. Note that if you do not specify any ProgID in the Windows registry, Outlook will not call the GetFormRegionManifest and GetFormRegionIcon methods.

See Also

Reference

_FormRegionStartup Interface

_FormRegionStartup Members

Microsoft.Office.Interop.Outlook Namespace