System.Windows.Forms.Clipboard.SetAudio Method

Clears the Clipboard and then adds a byte array in the DataFormats.WaveAudio format after converting it to a System.IO.Stream.

Syntax

public static void SetAudio (byte[] audioBytes)

Parameters

audioBytes
A byte array containing the audio data.

Remarks

To retrieve audio data from the Clipboard, first use the Clipboard.ContainsAudio method to determine whether the Clipboard contains audio data before retrieving it with the Clipboard.GetAudioStream method.

Note:

The System.Windows.Forms.Clipboard class can only be used in threads set to single thread apartment (STA) mode. To use this class, ensure that your Main method is marked with the STAThreadAttribute attribute.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0