Full Screen for Media Player --> Catastropic Failure?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blabello
    New Member
    • Dec 2007
    • 5

    #1

    Full Screen for Media Player --> Catastropic Failure?

    Hello,

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

    Here's my code:
    ---------------------------------------------------------------------
    Private Sub playSongFS_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles playSongFS.Clic k
    Dim addTemp As String

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

    Dim player As Player
    player = New Player
    player.PlayerCo ntrol.URL = addTemp
    Me.Close()
    player.Show()
    ' player.AutoScal eDimensions = New Size(SystemInfo rmation.Primary MonitorMaximize dWindowSize)
    ' Dim temp As SizeF = player.CurrentA utoScaleDimensi ons()
    ' If the player is playing, switch to full screen.
    If (player.PlayerC ontrol.playStat e = WMPLib.WMPPlayS tate.wmppsTrans itioning) Then

    player.PlayerCo ntrol.fullScree n = 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.
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    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

    Comment

    Working...