By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,781 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,781 IT Pros & Developers. It's quick & easy.

Full Screen for Media Player --> Catastropic Failure?

P: 5
Hello,

On my windows form, I have a button that on click sets fullscreen property to true. At runtime, however, I get a "Catastrophic Failure."

Here's my code:
---------------------------------------------------------------------
Private Sub playSongFS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles playSongFS.Click
Dim addTemp As String

If (ComboBox1.SelectedIndex = 1) Then
addTemp = "C:\Documents and Settings\All Users\Documents\My Music\Sample Music\Beethoven's Symphony No. 9 (Scherzo).wma"
ElseIf (ComboBox1.SelectedIndex = 0) Then
addTemp = "C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Stories (Highway Blues).wma"
End If

Dim player As Player
player = New Player
player.PlayerControl.URL = addTemp
Me.Close()
player.Show()
' player.AutoScaleDimensions = New Size(SystemInformation.PrimaryMonitorMaximizedWind owSize)
' Dim temp As SizeF = player.CurrentAutoScaleDimensions()
' If the player is playing, switch to full screen.
If (player.PlayerControl.playState = WMPLib.WMPPlayState.wmppsTransitioning) Then

player.PlayerControl.fullScreen = True

End If
End Sub
---------------------------------------------------------------------------

Can anyone give me any thoughts as to why this is happening, and a possible solution? Or does anyone have any alternate solutions I could try?

Thanks.

B.L.
Dec 18 '07 #1
Share this Question
Share on Google+
1 Reply


Dököll
Expert 100+
P: 2,364
Greetings!

What happens after you get this unfriendly error?

Quite a bummer to have to deal with that:-)

Does the system do anything else, does it shutdown...

Let us know what else may be happening if none of the above.

Dököll
Dec 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.