共用方式為


TextSelection.TopPoint Property

Definition

Gets the top end of the selection.

public:
 property EnvDTE::VirtualPoint ^ TopPoint { EnvDTE::VirtualPoint ^ get(); };
public:
 property EnvDTE::VirtualPoint ^ TopPoint { EnvDTE::VirtualPoint ^ get(); };
[System.Runtime.InteropServices.DispId(14)]
public EnvDTE.VirtualPoint TopPoint { [System.Runtime.InteropServices.DispId(14)] get; }
[<System.Runtime.InteropServices.DispId(14)>]
[<get: System.Runtime.InteropServices.DispId(14)>]
member this.TopPoint : EnvDTE.VirtualPoint
Public ReadOnly Property TopPoint As VirtualPoint

Property Value

A VirtualPoint object.

Attributes

Examples

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  

Remarks

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

Applies to