SetAudio Method


SetAudio Method

Location

My.Computer.Clipboard.SetAudio

Syntax

 My.Computer.Clipboard.SetAudio(audioBytes) 

or:

 My.Computer.Clipboard.SetAudio(audioStream) 


audioBytes (required in syntax 1; Byte array)

A Byte array of the audio data to be written to the system clipboard


audioStream (required in syntax 2; Stream)

A System.IO.Stream object indicating the audio data content to be written to the system clipboard

Description

The SetAudio method writes audio data to the system clipboard. Separate overloads allow you to write the data from a Stream or a Byte array.

Usage at a Glance

  • This method is only valid in non-server applications.

  • Security restrictions in place for the active user may limit access to the system clipboard.

Example

The following example reads data from an audio file and saves it to the clipboard.

     Dim audioData As Byte(  ) = _        My.Computer.FileSystem.ReadAllBytes("c:\temp\SoundFile.wav")     My.Computer.Clipboard.SetAudio(audioData) 

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.ClipboardProxy.SetAudio Method

  • System.Windows.Forms.Clipboard.SetAudio Method

See Also

Clipboard Object, ContainsAudio Method, GetAudioStream Method, SetAudio Method, SetData Method, SetDataObject Method, SetFileDropList Method, SetImage Method, SetText Method




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net