Computer.Audio 속성

정의

소리를 재생하기 위한 메서드의 속성을 제공하는 개체를 가져옵니다.

public:
 property Microsoft::VisualBasic::Devices::Audio ^ Audio { Microsoft::VisualBasic::Devices::Audio ^ get(); };
public Microsoft.VisualBasic.Devices.Audio Audio { get; }
member this.Audio : Microsoft.VisualBasic.Devices.Audio
Public ReadOnly Property Audio As Audio

속성 값

My.Computer.Audio 컴퓨터의 개체입니다.

예제

지정된 경우 메서드는 My.Computer.Audio.Play 백그라운드 AudioPlayMode.Background 에서 지정된 소리를 재생합니다.

Sub PlayBackgroundSoundFile()
    My.Computer.Audio.Play("C:\Waterfall.wav",
        AudioPlayMode.WaitToComplete)
End Sub

이 코드는 Windows Forms 애플리케이션 내에서만 실행할 수 있습니다.

파일 이름은 시스템에서 .wav 사운드 파일을 참조해야 합니다.

사운드 파일 관리를 간소화하려면 파일을 애플리케이션 리소스로 저장하는 것이 좋습니다. 그런 다음 개체를 통해 My.Resources 파일에 액세스할 수 있습니다. 자세한 내용은 My.Resources 개체를 참조하세요.

설명

이 속성은 개체에 쉽게 액세스할 수 있도록 My.Computer.Audio 합니다. 자세한 내용은 개체를 참조 Audio 하세요.

프로젝트 유형별 가용성

프로젝트 형식 사용 가능
Windows Forms 애플리케이션 Yes
클래스 라이브러리 Yes
콘솔 애플리케이션 Yes
Windows Forms 컨트롤 라이브러리 Yes
웹 제어 라이브러리 No
Windows 서비스 Yes
웹 사이트 No

적용 대상

추가 정보