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
    형식: System.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 네임스페이스