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() 
HRESULT __stdcall Navigate();
public void Navigate();
[JScript .NET]
public function Navigate()


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.


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.
End Sub

See Also

Applies To: TaskList Object