Método EditPoint2.Copy (Object, Boolean)

Copia o intervalo especificado de texto na área de transferência.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (em EnvDTE80.dll)

Sintaxe

'Declaração
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
)

Parâmetros

  • Append
    Tipo: System.Boolean
    Opcional.Indica se deve acrescentar o texto selecionado na área de transferência.O padrão é false.

Comentários

Se o argumento for uma TextPoint o objeto, Copy copia uma seqüência de caracteres que representa o texto entre o ponto de edição e PointOrCount.Se o argumento for um número inteiro, em seguida, Copy copia uma seqüência de caracteres que representa o número especificado de caracteres após o ponto de edição (contando um para cada seqüência newline implícitas no final de cada linha).Se PointOrCount for negativo, em seguida, Copy copia texto antes do ponto de edição, em vez de após.

Se Append é true, em seguida, Copy acrescenta a seleção para o conteúdo da área de transferência atual em vez de substituí-lo.

Exemplos

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

Segurança do .NET Framework

Consulte também

Referência

EditPoint2 Interface

Sobrecargas Copy

Namespace EnvDTE80