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.
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.
Comment