472,121 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

play video

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.

Jan 6 '07 #1
3 4535
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.SpecialDirect ories.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.

"John Piper" wrote:
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.
Jan 6 '07 #2
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
"P. Di Stolfo" <PD*******@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
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.SpecialDirect ories.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.

"John Piper" wrote:
>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.

Jan 7 '07 #3
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.

"john piper" <jo**@piper.comwrote in message
news:sW***********@tornado.tampabay.rr.com...
>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
"P. Di Stolfo" <PD*******@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
>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.SpecialDirec tories.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.

"John Piper" wrote:
>>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.

Jan 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Will | last post: by
4 posts views Thread by jaffar | last post: by
5 posts views Thread by mcfarlandorama | last post: by
3 posts views Thread by Ryan Liu | last post: by

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.