TextSelection.SelectLine 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
选择包含活动点的行。
public:
void SelectLine();
public:
void SelectLine();
void SelectLine();
[System.Runtime.InteropServices.DispId(48)]
public void SelectLine ();
[<System.Runtime.InteropServices.DispId(48)>]
abstract member SelectLine : unit -> unit
Public Sub SelectLine ()
- 属性
示例
Sub SelectLineExample()
' Before running this example, open a text document.
Dim objSel As TextSelection = DTE.ActiveDocument.Selection
' Advance to the next Visual Basic function beginning or end by
' searching for "Sub" with white space before and after it.
If objSel.FindPattern(":WhSub:Wh", vsFindOptions.vsFindOptionsRegularExpression) Then
' Select the entire line.
objSel.SelectLine()
End If
End Sub