Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ClipboardProxy.SetAudio Method

Definition

Namespace:
Microsoft.VisualBasic.MyServices
Assembly:
Microsoft.VisualBasic.dll
Assembly:
Microsoft.VisualBasic.Forms.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Writes audio data to the Clipboard.

Overloads

Name Description
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
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
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


Feedback

Was this page helpful?