2016 June Microsoft Official New Released 70-511 Q&As in GreatExam.com!
100% Free Download! 100% Pass Guaranteed!
We offers the most current and best training materials of the 70-511 certification Q&A , Practice Software, Study Packs, Preparation Labs and Audio Training you are looking for. Our online certification training offers you quick and cost-efficient way to train and become a certified professional in IT industry.
Following questions and answers are all new published by Microsoft Official Exam Center: (The full version is in the end of the article!!!)
QUESTION 131
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button.
You plan to store the name of the file to a variable named SoundFilePath.
You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays. What should you do?
A. Write the following code segment in the button onclick event.
Dim player As New System.Media.SoundPlayer(SoundFilePath)
player.Play()
B. Write the following code segment in the button onclick event.
Dim player As New MediaPlayer()
player.Open(New URI(SoundFilePath), UriKind.Relative)
player.Play()
C. Use the following code segment from the PlaySound() Win32 API function and call the
PlaySound function in the button onclick event.
<sysimport(dll : = “winmm.dll”)>
Public Shared Function PlaySound(SoundFilePath As [String],
Module As Long, dwFlags As
Long) As Long
End Function
D. Reference the Microsoft.DirectX Dynamic Link Libraries.
Use the following code segment in the button onclick event.
Dim song As Audio = New Song (SoundFilePath)
song.CurrentPosition B song.Duration
song.Play()