Redigera

Dela via


ClipboardProxy.SetAudio Method

Definition

Writes audio data to the Clipboard.

Overloads

SetAudio(Byte[])

Writes audio data to the Clipboard.

SetAudio(Stream)

Writes audio data to the Clipboard.

SetAudio(Byte[])

Source:
ClipboardProxy.vb
Source:
ClipboardProxy.vb
Source:
ClipboardProxy.vb

Writes audio data to the Clipboard.

public:
 void SetAudio(cli::array <System::Byte> ^ audioBytes);
public void SetAudio (byte[] audioBytes);
member this.SetAudio : byte[] -> unit
Public Sub SetAudio (audioBytes As Byte())

Parameters

audioBytes
Byte[]

Byte array. Audio data to be written to the Clipboard. Required.

Examples

This example creates the byte array musicReader, reads the file cool.wav into it, and then writes it to the Clipboard.

Dim musicReader = My.Computer.FileSystem.ReadAllBytes("cool.wav")
My.Computer.Clipboard.SetAudio(musicReader)

Replace cool.wav with the name and path of the file you wish to read.

Remarks

Important

Because the Clipboard can be accessed by other users, do not use it to store sensitive information, such as passwords or confidential data.

Availability by Project Type

Project type Available
Windows Application Yes
Class Library Yes
Console Application Yes
Windows Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

See also

Applies to

SetAudio(Stream)

Source:
ClipboardProxy.vb
Source:
ClipboardProxy.vb
Source:
ClipboardProxy.vb

Writes audio data to the Clipboard.

public:
 void SetAudio(System::IO::Stream ^ audioStream);
public void SetAudio (System.IO.Stream audioStream);
member this.SetAudio : System.IO.Stream -> unit
Public Sub SetAudio (audioStream As Stream)

Parameters

audioStream
Stream

Stream Audio data to be written to the clipboard. Required.

Examples

This example creates the byte array musicReader, reads the file cool.wav into it, and then writes it to the Clipboard.

Dim musicReader = My.Computer.FileSystem.ReadAllBytes("cool.wav")
My.Computer.Clipboard.SetAudio(musicReader)

Replace cool.wav with the name and path of the file you wish to read.

Remarks

Important

Because the Clipboard can be accessed by other users, do not use it to store sensitive information, such as passwords or confidential data.

Availability by Project Type

Project type Available
Windows Application Yes
Class Library Yes
Console Application Yes
Windows Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

See also

Applies to