Share via

IVsUIShell Interface


This interface provides access to basic windowing functionality, including access to and creation of tool windows and document windows.

public interface class IVsUIShell
public interface class IVsUIShell
__interface IVsUIShell
public interface IVsUIShell
public interface IVsUIShell
type IVsUIShell = interface
type IVsUIShell = interface
Public Interface IVsUIShell


Use the service SVsUIShell to get this interface when VSPackages, projects or editors need to create or enumerate tool or document windows

Notes to Implementers

Implemented by the environment.


AddNewBFNavigationItem(IVsWindowFrame, String, Object, Int32)

Adds a new backward and forward navigation item.

CenterDialogOnWindow(IntPtr, IntPtr)

Centers the provided dialog box HWND on the parent HWND (if provided), or on the main IDE window.

CreateDocumentWindow(UInt32, String, IVsUIHierarchy, UInt32, IntPtr, IntPtr, Guid, String, Guid, IServiceProvider, String, String, Int32[], IVsWindowFrame)

This method creates a document window containing the embedding indicated by the punkDocView parameter.

CreateToolWindow(UInt32, UInt32, Object, Guid, Guid, Guid, IServiceProvider, String, Int32[], IVsWindowFrame)

This method creates a tool window containing the embedding indicated by punkDocView, or the clsidDocView parameter, if the punkDocView parameter is null.


Enables or disables a frame's modeless dialog box.

FindToolWindow(UInt32, Guid, IVsWindowFrame)

Returns the IVsWindowFrame pointer for the requested single-instance tool window.

FindToolWindowEx(UInt32, Guid, UInt32, IVsWindowFrame)

Returns the IVsWindowFrame pointer for the requested single- or multi-instance tool window.


Returns the name of the application.

GetCurrentBFNavigationItem(IVsWindowFrame, String, Object)

Returns the current backward and forward navigation item.


Returns the HWND that can be used to parent modal dialogs.


Brings up the Browse dialog box to find a directory location.


Returns an enumerator that iterates through all existing document windows in the environment.


Gets the text of error messages.

GetNextBFNavigationItem(IVsWindowFrame, String, Object)

Returns the next backward and forward navigation item.


Brings up the Open dialog box to obtain an open file name.

GetPreviousBFNavigationItem(IVsWindowFrame, String, Object)

Returns the previous backward and forward navigation item.


Brings up the Save As dialog box to save a file.


Returns an enumerator that iterates through all of the existing tool windows in the environment.

GetURLViaDlg(String, String, String, String)

Brings up Open Project From Web dialog box to obtain a URL from a user.


This method is deprecated. Use GetVSSysColorEx(Int32, UInt32) instead.


Internal method. Do not use.

PostExecCommand(Guid, UInt32, UInt32, Object)

Allows asynchronous execution of commands.

PostSetFocusMenuCommand(Guid, UInt32)

Sets focus in a combo box.


Makes it possible for a project (or any other selected object being browsed by the Properties window) to keep the Properties window in sync with property changes without implementing IConnectionPointContainer and firing OnChanged(Int32) events.


Removes an adjacent navigation item in the specified direction.


Removes navigation duplicates in backward and forward navigation.


Helper method that displays an error message to the user.

SaveDocDataToFile(VSSAVEFLAGS, Object, String, String, Int32)

Helper method used by editors that implement the IVsPersistDocData interface.

SetErrorInfo(Int32, String, UInt32, String, String)

Helper method that records rich information about an error.


Activates the environment application window by calling the SetForegroundWindow Win32 API.

SetMRUComboText(Guid, UInt32, String, Int32)

Adds information to a combo box list.

SetMRUComboTextW(Guid[], UInt32, String, Int32)

Adds information to a combo box list.

SetToolbarVisibleInFullScreen(Guid[], UInt32, Int32)

Sets the toolbar to visible when the window is in full-screen mode.

SetupToolbar(IntPtr, IVsToolWindowToolbar, IVsToolWindowToolbarHost)

Called by VSPackage that creates a tool window in order to attach a toolbar to the tool window.


Changes the cursor to the hourglass cursor.

ShowContextMenu(UInt32, Guid, Int32, POINTS[], IOleCommandTarget)

Shows the context menu for the active menu object.

ShowMessageBox(UInt32, Guid, String, String, String, UInt32, OLEMSGBUTTON, OLEMSGDEFBUTTON, OLEMSGICON, Int32, Int32)

Manages implementation of a message box event.


Causes the environment to use the active key binding table to convert, if possible, a keyboard message into the appropriate command, then route the command using the usual command routing mechanism.


Informs the environment to update the state of the command bars (menus and toolbars).

UpdateDocDataIsDirtyFeedback(UInt32, Int32)

Makes it possible for a document data object to synchronously inform the environment when their document must be changed.

Applies to