Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

StatusBar Object

Visual Studio .NET 2003

Represents the Status Bar in the Visual Studio environment.

DTE

   StatusBar

[Visual Basic .NET]
Public Interface StatusBar
    Inherits IDispatch
[Visual Basic 6]
Class StatusBar
[C++]
interface StatusBar : IDispatch
[C#]
public interface StatusBar : IDispatch
[JScript .NET]
public interface StatusBar extends IDispatch

Remarks

There is only one StatusBar object in the environment, created by the environment.

Requirements

Namespace: EnvDTE

File: dte.olb

Example

Since this example lists all of the tasks currently in the Task List, make sure it contains some tasks before running the code.

Sub StatusBarExample()
   ' Create object references and initialize variables.
   Dim SBar As StatusBar
   Dim TList As TaskList
   Dim TItems As TaskItems
   Dim TI As TaskItem
   Dim count As Long
   Dim i As Long

   SBar = DTE.StatusBar
   ' Get references to Task List.
   TList = DTE.Windows().Item(Constants.vsWindowKindTaskList).Object
   TItems = TList.TaskItems
   i = 1
   count = TItems.Count
   
   ' Loop through Task List items, updating progress bar for each item.
   For Each TI In TItems
      SBar.Progress(True, TI.Description, i, count)
      SBar.SetLineColumnCharacter(i, count, 0)
      i = i + 1
      MsgBox("Task: " & i - 1 & vbCr & "Description: " & TI.Description & vbCr & "Next task item...")
   Next
   ' All done, so get rid of the bar.
   SBar.Progress(False)
End Sub

See Also

TaskList Object

Properties, Methods, and Events

Show:
© 2015 Microsoft