How to minimize the media player?

F

Freesc

Hi,there~

i'm writing an application that needs the WMP running at background.

i'm using C# to start a new process for media player,but i don't know
how to minimize the player at the very beginning.

any suggestion about that ?

thanks in advance :)
 
P

Peter Foot

You could bring your own form to the foreground after launching WMP, perhaps
on a thread with a short sleep in it to give the process a chance to get
started before you switch back to your application.

Peter
 
F

Freesc

You could bring your own form to the foreground after launching WMP, perhaps
on a thread with a short sleep in it to give the process a chance to get
started before you switch back to your application.

Peter

--
Peter Foot
Microsoft Device Application Development MVPwww.peterfoot.net|www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility










- Show quoted text -

That's it ! ! it works!

Thanks Peter !!

And other problem is how to triggle an even when the track is played
to the end. I can't find any API to do this .

However , thank you again, Peter~

:)
 
G

Guest

You can't know when MP is done - it doesn't have events for that sort of
thing. If you need control over the playback, you're better off using the
Media Plaer ActiveX control in your application (in which case you never
need to hide Media Player anyway).


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


You could bring your own form to the foreground after launching WMP,
perhaps
on a thread with a short sleep in it to give the process a chance to get
started before you switch back to your application.

Peter

--
Peter Foot
Microsoft Device Application Development
MVPwww.peterfoot.net|www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility










- Show quoted text -

That's it ! ! it works!

Thanks Peter !!

And other problem is how to triggle an even when the track is played
to the end. I can't find any API to do this .

However , thank you again, Peter~

:)
 
F

Freesc

You can't know when MP is done - it doesn't have events for that sort of
thing.  If you need control over the playback, you're better off using the
Media Plaer ActiveX control in your application (in which case you never
need to hide Media Player anyway).

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded communityhttp://community.OpenNETCF.com






That's it ! !   it works!

Thanks Peter !!

And other problem is how to triggle an even when the track is played
to the end. I can't find any API to do this .

However , thank you again, Peter~

:)- Hide quoted text -

- Show quoted text -

Thanks a lot ,Chris

I'll try it If the mediaplayerX can provide something like the length
of a playing track.
 
G

Guest

It can. That's how Media Player itself shows that information.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


You can't know when MP is done - it doesn't have events for that sort of
thing. If you need control over the playback, you're better off using the
Media Plaer ActiveX control in your application (in which case you never
need to hide Media Player anyway).

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded communityhttp://community.OpenNETCF.com






That's it ! ! it works!

Thanks Peter !!

And other problem is how to triggle an even when the track is played
to the end. I can't find any API to do this .

However , thank you again, Peter~

:)- Hide quoted text -

- Show quoted text -

Thanks a lot ,Chris

I'll try it If the mediaplayerX can provide something like the length
of a playing track.
 
F

Freesc

It can.  That's how Media Player itself shows that information.

--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded communityhttp://community.OpenNETCF.com












Thanks a lot ,Chris

I'll try it If the mediaplayerX can provide something like the length
of a playing track.- Hide quoted text -

- Show quoted text -

Well,thank you again,Peter and Chris. it helped!

:)
 

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