473,698 Members | 2,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Minmize Media Player on ESC Button Press

95 New Member
I have two buttons Play & Full Screen. If u click on Play Button,Movie starts..Movie Starts within 15-20 Seconds.....Whe n 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(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnPLAY.Click
AxWindowsMediaP layer1.URL = "http://www.voanews.com/wm/voa/europe/alba/alba1700vb.asx"
End Sub

Private Sub btnFULLSCREEN_C lick(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnFULLSCREEN.C lick
AxWindowsMediaP layer1.fullScre en = True
End Sub


Private Sub AxWindowsMediaP layer1_KeyDownE vent(ByVal sender As Object, ByVal e As AxWMPLib._WMPOC XEvents_KeyDown Event) Handles AxWindowsMediaP layer1.KeyDownE vent
If e.nKeyCode = Keys.Escape Then
If AxWindowsMediaP layer1.fullScre en Then
AxWindowsMediaP layer1.fullScre en = False
End If
End If
End Sub

Private Sub AxWindowsMediaP layer1_KeyPress Event(ByVal sender As Object, ByVal e As AxWMPLib._WMPOC XEvents_KeyPres sEvent) Handles AxWindowsMediaP layer1.KeyPress Event
If e.nKeyAscii = 27 Then
If AxWindowsMediaP layer1.fullScre en Then
AxWindowsMediaP layer1.fullScre en = False
End If
End If
End Sub



End Class
Oct 15 '08 #1
0 1092

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

Similar topics

0
1160
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> <HEAD> </HEAD> <BODY> <OBJECT ID="Player" height="0" width="0" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"> </OBJECT>
3
4811
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
2862
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 and then it stops. When I refresh the page, it works fine. Not sure what to think here about this. Any ideas?
1
5546
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 you give a bad/invalid URL for windows media player to play a pop-up window shows us that it cannot be played. So I would want to catch that event.
19
19264
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 things a bit easier. What I need to do is create a playlist and play it using JavaScript. I keep on getting close but not close enough to play the dang files. Has anyone done this before and can shed some light on what worked for them?
1
1779
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 need is top be able to pass the location of the file to the media player. if i use a macro and hard code my file location the command line looks like this: "c:\program files\windows media player\wmplayer.exe"...
1
3527
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. btn_open_mediaFile works fine, tn_open_playlist acts likes nothing happened except I see the name of the playlist. What am I missing? Also, if an mo3 is playing, loading a playlist stops it from playing. here is my code
1
4311
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 user plays the media file before continuing and saving the file. i would do this by insuring that the currentposition in the file being played is not = 0. However, if the user clicks the stop button in media player, the position goes to 0...
0
864
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 starts.. I want that on Save_Movie Button, Video that is Running in media player is Saved in computer.can Somebody tell me from where to start??
0
8608
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7734
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.