Поделиться через


Ink.ClipboardCopy - метод (InkClipboardFormats, InkClipboardModes)

Обновлен: Ноябрь 2007

Copies the Ink object to the Clipboard.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Function ClipboardCopy ( _
    formats As InkClipboardFormats, _
    modes As InkClipboardModes _
) As IDataObject
'Применение
Dim instance As Ink
Dim formats As InkClipboardFormats
Dim modes As InkClipboardModes
Dim returnValue As IDataObject

returnValue = instance.ClipboardCopy(formats, _
    modes)
public IDataObject ClipboardCopy(
    InkClipboardFormats formats,
    InkClipboardModes modes
)
public:
IDataObject^ ClipboardCopy(
    InkClipboardFormats formats, 
    InkClipboardModes modes
)
public IDataObject ClipboardCopy(
    InkClipboardFormats formats,
    InkClipboardModes modes
)
public function ClipboardCopy(
    formats : InkClipboardFormats, 
    modes : InkClipboardModes
) : IDataObject

Параметры

Возвращаемое значение

Тип: System.Windows.Forms.IDataObject
The data object to be created. The default value is nullссылка null (Nothing в Visual Basic) (Nothing in Microsoft Visual Basic.NET).

Заметки

This method copies the Ink object to the Clipboard, including the CustomStrokes property. In addition, the RecognitionResult property of strokes in the Ink object's CustomStrokes collection is maintained.

If the Ink object's Strokes collection is empty, the method returns nullссылка null (Nothing в Visual Basic) (Nothing in Visual Basic .NET), and the contents of the Clipboard are not modified.

Предупреждение

To avoid potential memory leaks as a result of using the InkClipboardModes flag, call the SetDataObject method of the Clipboard object. This must be done before the application exits if the last call to the ClipboardCopy method used the DelayedCopy flag in enumeration InkClipboardModes.

ms569552.alert_security(ru-ru,VS.90).gifПримечание о безопасности.

If using under partial trust, this method requires UIPermissionClipboard.OwnClipboard permission. See Security And Trust for more information.

Примеры

This C# example uses a menu's click event handler to copy all of the ink from the InkCollector object, theInkCollector, to the Clipboard.

private void menuEditCopyAll_Click(object sender, EventArgs e)
{    
    try
    {
        theInkCollector.Ink.ClipboardCopy(InkClipboardFormats.Default, 
            InkClipboardModes.Copy);    
    }    
    catch
    {
        // Place exception handling code here.
    }
}

This Visual Basic .NET example uses a menu's click event handler to copy all of the ink from the InkCollector object, theInkCollector, to the Clipboard.

Private Sub menuEditCopy_Click(Dim sender As Object, Dim e As EventArgs)
    Try
        theInkCollector.Ink.ClipboardCopy(InkClipboardFormats.Default, _
            InkClipboardModes.Copy)
    Catch
        'Place exception handling code here.
    End Try
End Sub

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

Ink Класс

Ink - члены

ClipboardCopy - перегрузка

Microsoft.Ink - пространство имен

ClipboardPaste