TextSelection::TopPoint Property

 

Gets the top end of the selection.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

property VirtualPoint^ TopPoint {
	VirtualPoint^ get();
}

Property Value

Type: EnvDTE::VirtualPoint^

A VirtualPoint object.

TopPoint returns the first VirtualPoint object to which the text selection extends, regardless of which end of the selection is the active end.

Sub TopPointExample()
   ' Before running this example, open a code document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   MsgBox("TopPoint line: " & objSel.TopPoint.Line)
End Sub
Return to top
Show: