My.Computer.Clipboard.GetAudioStream Method

Retrieves an audio stream from the Clipboard.

' Usage
Dim value As System.IO.Stream = My.Computer.Clipboard.GetAudioStream()
' Declaration
Public Function GetAudioStream() As System.IO.Stream

Return Value

Stream

Example

This example retrieves an audio stream from the Clipboard and plays it.

If My.Computer.Clipboard.ContainsAudio Then 
   Dim song As System.IO.Stream
   song = My.Computer.Clipboard.GetAudioStream
   My.Computer.Audio.Play(song, AudioPlayMode.WaitToComplete)
End If

Requirements

Namespace:Microsoft.VisualBasic.MyServices

Class:ClipboardProxy (provides access to Clipboard)

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

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

Permissions

No permissions are required.

See Also

Reference

My.Computer.Clipboard Object

System.IO.Stream

Clipboard.GetAudioStream

My.Computer.Clipboard.ContainsAudio Method

My.Computer.Clipboard.SetAudio Method

Other Resources

Storing Data to and Reading From the Clipboard