I have two buttons Play & Full Screen. If u click on Play Button,Movie starts..Movie Starts within 15-20 Seconds.....When u clik on Full Screen Button.,Media Player is Maximised. I want the if the media player is maximised,& when we click on ESC Button, Media player is minimsed.......But I m nota ble to achiev that.. Secondly I do not know that which event is used for dat KeyPress Or keyDown.. I have used both of these,But None is working/..
Mine Code is as Under.Plz go thru it..& help me it sorting out---
Public Class Form1
Private Sub btnPLAY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPLAY.Click
AxWindowsMediaPlayer1.URL = "http://www.voanews.com/wm/voa/europe/alba/alba1700vb.asx"
End Sub
Private Sub btnFULLSCREEN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFULLSCREEN.Click
AxWindowsMediaPlayer1.fullScreen = True
End Sub
Private Sub AxWindowsMediaPlayer1_KeyDownEvent(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_KeyDownEvent) Handles AxWindowsMediaPlayer1.KeyDownEvent
If e.nKeyCode = Keys.Escape Then
If AxWindowsMediaPlayer1.fullScreen Then
AxWindowsMediaPlayer1.fullScreen = False
End If
End If
End Sub
Private Sub AxWindowsMediaPlayer1_KeyPressEvent(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_KeyPressEvent) Handles AxWindowsMediaPlayer1.KeyPressEvent
If e.nKeyAscii = 27 Then
If AxWindowsMediaPlayer1.fullScreen Then
AxWindowsMediaPlayer1.fullScreen = False
End If
End If
End Sub
End Class