473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Minmize Media Player on ESC Button Press

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
Oct 15 '08 #1
0 1062

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

Similar topics

0
by: Jon Schwartz | last post by:
Hi all, I found this succint and straightforward example at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay10/mmp_sdk/simpleexampleofscriptinginawebpage.asp : <HTML>...
3
by: Devron Blatchford | last post by:
Hi there, Can someone tell me how I can detect media buttons (play, stop etc) in VB.NET. KeyPress, up, down events don't seem to capture them. Thanks Devron
2
by: codepuller | last post by:
I have a embedded media player into an ASP.NET web page and it all works except for the first time the page loads, when the user clicks on the play button, the player acts like it is going to play...
1
by: sri2097 | last post by:
Basically, I want to check if a URL is playable or not (without actually playing it). i.e. given a URL I want to write an automation script to figure it out for me if it's playable or not. If...
19
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make...
1
by: syslight | last post by:
Hello, I need to open a media player window so that i have the controls, from a form ideally, the user would push a button and the player would open tot eh correct file. one other thing i...
1
by: Ringo | last post by:
I'm trying to use windows media player in an app. I can give it an mp3 and it plays it, but if I give it a playlist it will not play and even the play button on the control is not active. ...
1
by: Shaba99 | last post by:
Hey everyone, New to this forum, but i search for answers here often. I have a c# windows application which embeds windows media player on the form. The application (biz rule) requires that the...
0
by: mansi sharma | last post by:
I added nedia player on mine form. On Button click, In media player video starts. Suppose i write. AXMediaPlayer1.URL="http://www.voanews.com/wm/voa/europe/alba/alba1700vb.asx" Now the Video...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.