次の方法で共有


FormRegionStartup Interface

Defines an interface that allows an add-in to specify the storage and the user interface of a form region, obtains an object for that form region, and determines when the form region is about to be displayed in a form or in the Reading Pane.

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

Syntax

'Declaration
<CoClassAttribute(GetType(FormRegionStartupClass))> _
<GuidAttribute("00063059-0000-0000-C000-000000000046")> _
Public Interface FormRegionStartup _
    Inherits _FormRegionStartup
'Usage
Dim instance As FormRegionStartup
[CoClassAttribute(typeof(FormRegionStartupClass))]
[GuidAttribute("00063059-0000-0000-C000-000000000046")]
public interface FormRegionStartup : _FormRegionStartup

Remarks

This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _FormRegionStartup.

The FormRegionStartup interface is an abstract class, which means that it cannot be instantiated directly. In Visual Basic, you can use the Implements keyword to provide the methods of FormRegionStartup in your add-in class as follows:

Implements Outlook._FormRegionStartup.BeforeFormRegionShow

An add-in deploying a form region in an Outlook form on a client computer must implement the FormRegionStartup interface which consists of the two methods, BeforeFormRegionShow and GetFormRegionStorage. When Outlook loads the add-in, Outlook queries the IDTExtensibility2 interface for FormRegionStartup.

The add-in indicates the storage and layout file for the form region in GetFormRegionStorage. By calling GetFormRegionStorage, Outlook allocates storage and calculates the layout for the form region, instantiates an object for the form region, and returns a value representing the storage allocated to the add-in. If GetFormRegionStorage is successful, just before the form region is displayed in an Inspector window or in the Reading Pane, Outlook will call BeforeFormRegionShow and pass the FormRegion object of the form region to the add-in. The add-in uses this opportunity before the form region is displayed to update any controls in the form region.

When the add-in closes the frame for the form region, the add-in must release the object for the form region.

For more information on writing add-ins for form regions, see Extending a Form Region with an Add-in. For examples of add-ins in C# and Visual Basic .NET that implement FormRegionStartup, see code sample downloads on MSDN.

See Also

Reference

FormRegionStartup Members

Microsoft.Office.Interop.Outlook Namespace