SoundPlayer.SoundLocation 속성

정의

로드할 .wav 파일의 파일 경로 또는 URL을 가져오거나 설정합니다.

public:
 property System::String ^ SoundLocation { System::String ^ get(); void set(System::String ^ value); };
public string SoundLocation { get; set; }
member this.SoundLocation : string with get, set
Public Property SoundLocation As String

속성 값

로드할 .wav 파일이 있는 파일 경로 또는 URL이거나, 파일 경로가 없는 경우 Empty입니다. 기본값은 Empty입니다.

예제

다음 코드 예제를 사용 SoundLocation 하는 .wav 파일 원본을 할당 하는 속성의 SoundPlayer instance 클래스입니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 SoundPlayer 클래스입니다.

try
{
   
   // Assign the selected file's path to 
   // the SoundPlayer object.  
   player->SoundLocation = filepathTextbox->Text;
   
   // Load the .wav file.
   player->Load();
}
catch ( Exception^ ex ) 
{
   ReportStatus( ex->Message );
}
try
{
    // Assign the selected file's path to 
    // the SoundPlayer object.  
    player.SoundLocation = filepathTextbox.Text;

    // Load the .wav file.
    player.Load();
}
catch (Exception ex)
{
    ReportStatus(ex.Message);
}
Try
    ' Assign the selected file's path to the SoundPlayer object.
    player.SoundLocation = filepathTextbox.Text

    ' Load the .wav file.
    player.Load()
Catch ex As Exception
    ReportStatus(ex.Message)
End Try

설명

이 속성은 속성이 StreamString.Empty 설정된 경우 로 Stream설정됩니다.

적용 대상

추가 정보