Share via


Package.CreateTool(Guid) Method

Definition

Enables derived classes to provide an implementation if necessary.

public:
 virtual int CreateTool(Guid % persistenceSlot);
public int CreateTool (ref Guid persistenceSlot);
abstract member CreateTool : Guid -> int
override this.CreateTool : Guid -> int
Public Function CreateTool (ByRef persistenceSlot As Guid) As Integer

Parameters

persistenceSlot
Guid

The GUID of the tool window that should be created.

Returns

S_OK if successful, otherwise an error code.

Implements

Remarks

Override the CreateTool method in your VSPackage.

The base implementation of the CreateTool method has no effect on the VSPackage. It is provided so that derived classes can provide an implementation if necessary.

The tool windows must be registered with Visual Studio. For information on the relevant registry keys and values, see Tool Windows in the Registry and ProvideToolWindowAttribute

Tool windows can be configured to be persistent. If a persistent tool window is open when the environment is shut down, it is automatically reopened the next time the environment is launched. To reopen Tool windows automatically when the environment is launched, pass CTW_ForceCreate to CreateToolWindow.

This method should not make the Tool window visible; that is, it should not call Show method.

Applies to