Share via


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

'Declaration
Sub OnStartupComplete ( _
    ByRef custom As Array _
)
void OnStartupComplete(
    ref Array custom
)
void OnStartupComplete(
    [InAttribute] Array^% custom
)
abstract OnStartupComplete : 
        custom:Array byref -> unit
function OnStartupComplete(
    custom : Array
)

Parameters

  • custom
    Type: System.Array%

    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.

Examples

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
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.");
}

.NET Framework Security

See Also

Reference

IDTExtensibility2 Interface

Extensibility Namespace

IDTExtensibility2

OnConnection

OnDisconnection

OnAddInsUpdate

OnBeginShutdown

Other Resources

How to: Create an Add-In