ClipboardProxy.SetAudio Method
Definition
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
SetAudio(Byte[]) |
Writes audio data to the Clipboard. |
SetAudio(Stream) |
Writes audio data to the Clipboard. |
SetAudio(Byte[])
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
- Computer
- SetAudio
- ContainsAudio()
- GetAudioStream()
- Objects (Visual Basic)
- Storing Data to and Reading From the Clipboard
Applies to
SetAudio(Stream)
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
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
- Computer
- Stream
- SetAudio
- ContainsAudio()
- GetAudioStream()
- Objects (Visual Basic)
- Storing Data to and Reading From the Clipboard
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om