Multi-Threading Question

M

Michael D Murphy

Hi,
I need to use Windows Meadia Player in my application to run som mpeg
movies. I do not want to use the playlist facility of the Windows Media
Player Control, I want to queue up the files to play myself. In order to do
that I need to know when the current file has been played and has stopped. I
started looking at multi-threading as a solution, but am having difficultly
with the algorithm. I get the main thread to start the first clip and get
the worker function to check when the player has stopped the first clip, but
then I am wondering where I put the code to load the next mpeg file and
start the worker function again. I hope this make sense.
Any help would be appreciated.
Michael Murphy
(e-mail address removed)
954-452-1047
 
N

Nick Malik

Hi Michael,
Two bits of advice:

1) Post in a language group... you will get specific help.
C#: microsoft.public.dotnet.languages.csharp
VB: microsoft.public.dotnet.languages.vb

2) Post a short, working, section of code (in your case, you may need a few
snippets of code). That gives us all a tangible way to approach the problem
with you and, possibly, see any "gotchas" that we might have faced before.

--- Nick
 
C

Cor Ligthert

Michael,

Completly in addition to Nick in a general way without code, your problem
looks like a simple problem (I can be wrong of course).

A main user interface (UI)
A thread playing

Actually you probably do not need a thread, however in this case it will
probably be nicer when you use a thread and give the playing thread a high
priority and the UI a low.

When the thread has to be stopped in the UI, just abort the thread and than
when a new one is needed create a new thread. Let the framework than do its
job to remove that old thread (which will be still a while to see in memory)

In this way it is really very easy to do. There comes a little bit more work
when you have as well a continue button on your UI.

Here some walkthroughs when I showed them last time to somebody he said that
he had done it in short while afer reading this and thought before that
multithreading was something difficult.

I thought it was for both language, now I saw this is VBNet.
http://msdn.microsoft.com/library/d...us/vbcn7/html/vaconThreadingInVisualBasic.asp

(Nick a little bit in advance sorry)

I hope this helps?

Cor
 
M

Michael D Murphy

Nick and Cor, Please check out my new posting in the VB newsgroup (Michael D
Murphy)
Thanks!
 
G

Guest

I sure wish Microsoft with all their talent could figure out a way to allow
people to print these articles, like giving us a PRINT button. When I print a
one page article on that site, I get 3 blank pages, 2 pages of 'Deeptree'
menus, and then my one page article. In other words 5 pages wasted!
 
P

Peter Huang

Hi Michael,

I have replied to your in the newsgroup below, you may go and take a look.
Subject: How to do Multi-Threading
Newsgroups: microsoft.public.dotnet.languages.vb

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jay B. Harlow [MVP - Outlook]

Rupert,
They have.

If you are using IE, right click on an article (text) you want printed, then
select Print.

Optionally you can select Print Preview, then select the "Only the selected
frame" in the combo box in the header.

Hope this helps
Jay

mscertified said:
I sure wish Microsoft with all their talent could figure out a way to allow
people to print these articles, like giving us a PRINT button. When I
print a
one page article on that site, I get 3 blank pages, 2 pages of 'Deeptree'
menus, and then my one page article. In other words 5 pages wasted!
<<snip>>
 

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