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
)
المعلمات
- Where
النوع: EnvDTE.vsStartOfLineOptions
اختياري.vsStartOfLineOptionsثابت يمثل مكان بدء السطر.
- Extend
النوع: System.Boolean
اختياري.يحدد ما إذا كان نص المنقول هو مطوية أم لا.يكون الإعداد الافتراضي هو false.
ملاحظات
إذا كان Extendهو True، ثم فقط نشط إنهاء نص محدد ينتقل إلى بداية مستند. Otherwهوe، على نص المحدد هو مطوية ونقلها.
أمثلة
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.
- الثقة الكاملة للمتصل الفوري. يتعذر استخدام هذا العضو بواسطة التعليمات البرمجية الموثوق بها جزئيًا. لمزيد من المعلومات، راجع باستخدام مكتبات من تعليمات برمجية موثوق بها جزئي.