Visual Studio Automation and Extensibility Reference
IDTExtensibility2.OnStartupComplete Method

Occurs whenever an add-in, which is set to load when Visual Studio starts, loads.

Namespace: Extensibility
Assembly: Extensibility (in extensibility.dll)

Syntax

Visual Basic (Declaration)
Sub OnStartupComplete ( _
    <InAttribute> ByRef custom As Array _
)
Visual Basic (Usage)
Dim instance As IDTExtensibility2
Dim custom As Array

instance.OnStartupComplete(custom)
C#
void OnStartupComplete (
    [InAttribute] ref Array custom
)
C++
void OnStartupComplete (
    [InAttribute] Array^% custom
)
J#
void OnStartupComplete (
    /** @attribute InAttribute() */ /** @ref */ Array custom
)
JScript
JScript does not support passing value-type arguments by reference.

Parameters

custom

An empty array that you can use to pass host-specific data for use when the add-in loads.

Remarks

On occasion, OnConnection does not occur correctly, such as when an add-in is loaded, but a component required by an add-in has not yet loaded. This is unusually due to the fact that Visual Studio has not yet started completely. Using OnStartupComplete guarantees that the Visual Studio integrated development environment (IDE) has completed the startup process.

Example

Visual Basic
Public Sub OnStartupComplete(ByRef custom As Array) Implements _
IDTExtensibility2.OnStartupComplete
    MsgBox("Notifies you when an add-in that is set to start when _
    Visual Studio starts has completed loading.")
End Sub
C#
public void OnStartupComplete(ref Array custom)
{
    // Notifies you when an add-in that is set to start when
    // Visual Studio starts has completed loading.
    System.Windows.Forms.MessageBox.Show("Add-in has loaded and is 
    ready.");
}
See Also

Tags :


Community Content

Craig Skibo - MSFT
custom parameter values
Visual Studio does not use the custom parameter to pass values to an Add-in. Some Microsoft Office applications, which also use IDTExtensibility2 for implementing Add-ins, do pass values through this parameter for use by the Add-in, but Visual Studio does not.
Tags :

Page view tracker