This documentation is archived and is not being maintained.

Navigate Method (TaskList Object)

Visual Studio .NET 2003

Sets the focus to the line in the source code that is associated with a particular task item in the Task List window.

[Visual Basic .NET]
Public Sub Navigate() 
[Visual Basic 6]
Sub Navigate() 
[C++]
HRESULT __stdcall Navigate();
[C#]
public void Navigate();
[JScript .NET]
public function Navigate()

Remarks

An item in the Task List can be associated with a particular line of code. The Navigate method allows you to set the focus to the line of code with which the task item is associated, if such an association exists.

Example

Sub NavigateExample()
   ' Before running, add a task to the Task List.
   Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)
   Dim TL As TaskList = win.Object
   Dim TLItem As TaskItem = TL.TaskItems.Item(1)

   ' The following line produces an error unless a file is associated with 
   ' the Task Item.
   TLItem.Navigate()
End Sub

See Also

Applies To: TaskList Object

Show: