This documentation is archived and is not being maintained.

How to: Save an Audio Stream to the Clipboard in Visual Basic

The My.Computer.Clipboard.SetAudio method can be used to save audio data to the Clipboard.

To save audio data to the Clipboard

  • Use the My.Computer.Clipboard.SetAudio method to write audio data to the Clipboard. This example creates the byte array musicReader, reads the file cool.wav into it, and then writes it to the Clipboard.

    Dim musicReader As Byte()
    musicReader = My.Computer.FileSystem.ReadAllBytes("cool.wav")