play video

J

John Piper

Again, I am a beginer, and need help.
Can some walk me through the steps to do the following:
click a button, which will play a video file in WMP in fullscreen mode
(launch player, not in a form)
then when the video is done playing, I want the player to close, then the
form that had the button to also close.
I really do not have a clue, so I need very basic instruction.

Thanks to those of you that share what you know so the rest of us can learn.
 
G

Guest

Hello,

I think it's possible to do this using the old mplayer2.exe (version 6.4)
which is in the same folder as Windows Media Player (up to version 10).
It accepts parameters, such as /close and /fullscreen.
(http://support.microsoft.com/kb/241422/en-us)

An example in VB 2005:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim a As New Process
a =
Process.Start(My.Computer.FileSystem.SpecialDirectories.ProgramFiles + _
"\Windows Media Player\mplayer2.exe", "/play /close /fullscreen
Path-File.wmv")
Me.Close()
End Sub

End Class

The form will close after WMP has turned up. At the moment, I don't know how
I can change that.
I could not test it because I have Vista and WMP 11, so please try it and
tell us whether it works or not. Hope this helps.
 
J

john piper

I have WMP 11, so that did not work. I think I need a way to play the
video, but do not know how (like I said I am clueless). I want it to do as
I said, however, to work on most machines, so maybe another more "global"
way so to say.

Thanks again to everyone
 
G

Graham

Could you not create a second blank form minus title bar etc and drop the
windows media player activex control on the form. The controls of the
player are then exposed for full screen, close, media file (url) etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top