EditPoint2.Copy Yöntem
Belirtilen metin aralığını panoya kopyalar.
Ad alanı: EnvDTE80
Derleme: EnvDTE80 (EnvDTE80.dll içinde)
Sözdizimi
'Bildirim
Sub Copy ( _
PointOrCount As Object, _
Append As Boolean _
)
void Copy(
Object PointOrCount,
bool Append
)
void Copy(
[InAttribute] Object^ PointOrCount,
[InAttribute] bool Append
)
abstract Copy :
PointOrCount:Object *
Append:bool -> unit
function Copy(
PointOrCount : Object,
Append : boolean
)
Parametreler
PointOrCount
Tür: ObjectGerekli.Ya da bir TextPoint nesne veya karakter sayısı.
Append
Tür: Booleanİsteğe bağlı.Seçili metni Pano'ya eklemek kullanılıp kullanılmayacağını gösterir.Varsayılan değer false.
Notlar
Bağımsız değişken ise bir TextPoint nesne, Copy nokta düzenlemeden arasındaki metni temsil eden bir dize kopyalar ve PointOrCount.Bağımsız değişken bir tamsayı ise, Copy belirtilen sayıda karakter (her satırın sonundaki her örtülü satır sırası için bir sayım) düzenleme noktasını temsil eden bir dize kopyalar.Yoksa PointOrCount negatif ise Copy nokta düzenlemeden önce değil, sonra metni kopyalar.
Yoksa Append olan true, sonra Copy değiştirmek yerine Seçimi geçerli Pano içeriğini ekler.
Örnekler
Sub CopyExample()
Dim objTextDoc As TextDocument
Dim objEditPt As EditPoint, iCtr As Integer
' Create a new text file.
DTE.ItemOperations.NewFile("General\Text File")
' Get a handle to the new document and create an EditPoint.
objTextDoc = DTE.ActiveDocument.Object("TextDocument")
objEditPt = objTextDoc.StartPoint.CreateEditPoint
' Insert ten lines of text.
For iCtr = 1 To 10
objeditpt.Insert("This is a test." & Chr(13))
Next iCtr
' Copies the fourth word of the fourth line, pastes it,
' and then cuts the fourth word of the eighth line.
objEditPt.StartOfDocument()
objEditPt.LineDown(3)
objEditPt.WordRight(3)
objEditPt.Copy(4)
objEditPt.Paste()
objEditPt.LineDown(3)
objEditPt.WordRight(3)
objEditPt.Cut(4)
End Sub
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen Güvenilen Koddan Kitaplıkları Kullanma.