共用方式為


TextSelection.SelectLine 方法

更新:2007 年 11 月

選取含有作用點的行。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

Sub SelectLine

Dim instance As TextSelection

instance.SelectLine()
void SelectLine()
void SelectLine()
function 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

使用權限

請參閱

參考

TextSelection 介面

TextSelection 成員

EnvDTE 命名空間