Share via


TextSelection.StartOfLine 메서드

개체를 현재 줄의 시작으로 이동합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Sub StartOfLine ( _
    Where As vsStartOfLineOptions, _
    Extend As Boolean _
)
void StartOfLine(
    vsStartOfLineOptions Where,
    bool Extend
)
void StartOfLine(
    [InAttribute] vsStartOfLineOptions Where, 
    [InAttribute] bool Extend
)
abstract StartOfLine : 
        Where:vsStartOfLineOptions * 
        Extend:bool -> unit
function StartOfLine(
    Where : vsStartOfLineOptions, 
    Extend : boolean
)

매개 변수

  • Extend
    형식: Boolean

    선택적 요소. 이동된 텍스트가 축소되었는지 여부를 확인합니다. 기본값은 false입니다.

설명

경우 Extend 는 True, 선택한 텍스트의 활성 끝만 문서의 시작으로 이동 합니다. 그렇지 않으면 선택한 텍스트는 축소 되 고 이동.

예제

Sub StartOfLineExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   Dim objActive As VirtualPoint = objSel.ActivePoint
   ' Collapse the selection to the beginning of the line.
   objSel.StartOfLine()
   ' objActive is "live", tied to the position of the actual selection, 
   ' so it will reflect the new position.
   Dim iCol As Long = objActive.DisplayColumn
   ' Move the selection to the end of the line.
   objSel.EndOfLine()

   MsgBox("The length of the insertion point line is " & (objActive.DisplayColumn - iCol) & " display characters.")
End Sub

.NET Framework 보안

참고 항목

참조

TextSelection 인터페이스

EnvDTE 네임스페이스