TextSelection.EndOfLine أسلوب
نقل الكائن إلى إنهاء السطر الحالي.
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
Sub EndOfLine ( _
Extend As Boolean _
)
void EndOfLine(
bool Extend
)
void EndOfLine(
[InAttribute] bool Extend
)
abstract EndOfLine :
Extend:bool -> unit
function EndOfLine(
Extend : boolean
)
المعلمات
- Extend
النوع: System.Boolean
اختياري.يحدد ما إذا كان نص المنقول هو مطوية أم لا.يكون الإعداد الافتراضي هو false.
ملاحظات
إذا Extendهو true، ثم فقط نشط إنهاء النص المحدد هو نقله. Otherwهوe، على نص المحدد هو طيها ووضعها في إنهاء مستند.
أمثلة
Sub EndOfLineExample()
' 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.
- الثقة الكاملة للمتصل الفوري. يتعذر استخدام هذا العضو بواسطة التعليمات البرمجية الموثوق بها جزئيًا. لمزيد من المعلومات، راجع باستخدام مكتبات من تعليمات برمجية موثوق بها جزئي.