Now I think that I have always had it. However the thread that plays music
seems to interrupt by the principal thread (the program thread). It is a
program for text processing.
Thanks in any case.
I have had very good luck with the following methods:
1) using a timer to start the action, it is messy but it does work.
Make sure you put the minimum amount of work in the timer process. I
have used timers to fire delegates so that a longer starting process
doesn't conflict with the timer.
2) If at all possible, use a discreet object for your separate thread.
3) To manage synchronization and scope, I have often passed a
reference to the controlling (dispatching) thread to the object that
will operate separately.
4) For managed communication you use delegates to raise events from
the child (free threaded) object which lets the free thread
communicate with the sender.
if you feel more brave:
5) It is very instructional to look at thread pooling (I use it for an
application I have writes application files for Progress and then
launches them maintaining 10-15 running instances at a time.) I
mention this as you indicate doing background processing.
6) Thread callbacks, even if you choose not to use them, are worth
understanding if you are going to adventure into the maddening world
of threading.
You may want to check out an erarlier post I had at
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/msg/ee5acbf0ae15e871
for some code and links to MSDN explanations.
Hope this helps.
Viva la VB