Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Status Bar

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The Visual Studio status bar, the horizontal region at the bottom of the Visual Studio design surface, provides a convenient way to convey information about the current state of the integrated development environment (IDE). The status bar comprises four programmable regions, as shown in the following table:

Region Description

Feedback

Displays text. You can set and retrieve text, display static text, and highlight the displayed text.

Progress Bar

Displays incremental progress for quick operations, such as saving a single file to disk.

Animation

Displays a continuously looped animation, which indicates either a lengthy operation or an operation of indeterminate length (for example, building multiple projects in a solution).

Designer

Displays information pertinent to editing, such as the line number or column number of the cursor location.

The status bar's functionality is available to any client object at any time through the IVsStatusbar interface, which is offered by the SVsStatusbar service. In addition, any object sited on a window frame can register as a status bar client object by implementing the IVsStatusbarUser interface. Whenever a window is activated, Visual Studio queries the object sited on that window for the IVsStatusbarUser interface. If found, Visual Studio calls the SetInfo method on the returned interface, and the object can update the status bar from within that method. Document windows, for example, can use the SetInfo method to update information in the Designer region when they become active.

Example

This example demonstrates how to display highlighted text in the Feedback region.

void SetColorTextExample()
{
    IVsStatusbar statusBar = 
        (IVsStatusbar)GetService(typeof(SVsStatusbar));
    IVsUIShell2 uiShell2 = (IVsUIShell2)GetService(typeof(SVsUIShell));
    int frozen;

    statusBar.IsFrozen(out frozen);

    if (frozen == 0)
    {
        // SetColorText only displays white text on a 
        // dark blue background.
        statusBar.SetColorText("Here's some highlighted text", 0, 0);
        System.Windows.Forms.MessageBox.Show("Pause");
        statusBar.SetText("Done");
    }
}

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.