How to: Program the Designer Region of the Status Bar

The Designer region of the Visual Studio status bar displays information that pertains to editing, for example, the line number or column number of the cursor location.

To program the Designer region of the Visual Studio status bar

  1. Obtain an instance of the IVsStatusbar interface, which is made available through the SVsStatusbar service.

  2. Update the Designer region of the status bar by calling the SetInsMode method and SetLineColChar method of the IVsStatusbar instance.

Example

This example demonstrates how to program the Designer region of the status bar.

Private Sub DisplayDesignerRegionInfo(ByVal statusBar As IVsStatusbar, ByVal insert As Boolean, ByVal line As Integer, ByVal column As Integer, ByVal character As Integer)
    ' Set insert/overstrike mode.  
    Dim mode As Object = If(insert, 0, 1)
    statusBar.SetInsMode(mode)

    ' Display Ln ## Col ## Ch ## information.  
    Dim ln As Object = line, col As Object = column, ch As Object = character
    statusBar.SetLineColChar(ln, col, ch)
End Sub
void DisplayDesignerRegionInfo(IVsStatusbar statusBar,
    bool insert, int line, int column, int character)
{
    // Set insert/overstrike mode. 
    object mode = insert ? 0 : 1;
    statusBar.SetInsMode(ref mode);

    // Display Ln ## Col ## Ch ## information. 
    object ln = line, col = column, ch = character;
    statusBar.SetLineColChar(ref ln, ref col, ref ch);
}

See Also

Tasks

How to: Read from and Write to the Feedback Region of the Status Bar

How to: Program the Progress Bar Region of the Status Bar

How to: Use the Animation Region of the Status Bar

Other Resources

Status Bar