If you can get to grips with threading, guys, it will pay off. You can do a lot of stuff with progress dialogs etc, if you can make use of threading. It doesn't have to be that complicated.
And IMHO, there is no place for Application.ProcessMessages in an app. It's a hack, and only useful for VB developers. ;-) I prefer clean designs, and App.ProcessMessages doesn't figure... No offence intended. Cheers, Conor -----Original Message----- From: Ben Taylor [mailto:[EMAIL PROTECTED] i think you need to forget about using .wait (and threading) and have a look at doing it asyncronously using the .onnotify event to tell when the current clip ends. much simpler (and possible).. something like: (quick hack) (the .mode property seems to have a bug in d6 too) procedure TForm1.Button1Click(Sender: TObject); //starts the sequence begin GetNext; mp.Open; mp.Play; end; procedure TForm1.mpNotify(Sender: TObject); //when clip ends, get the next clip to show and plays it begin if mp.Mode=mpstopped then begin GetNext; if mp.FileName='' then Exit; mp.Open; mp.Play; end; end; procedure TForm1.FormCreate(Sender: TObject); begin lb.Items.Add('c:\clip1.avi'); lb.Items.Add('c:\clip2.avi'); end; procedure TForm1.GetNext; //gets next filename from a listbox var aStr:string; begin if lb.Items.Count>0 then begin mp.FileName:=lb.Items[0]; lb.Items.Delete(0); end else begin mp.FileName:=''; end; end; hope that helps, b --- Chris Veale <[EMAIL PROTECTED]> wrote: > Hi. > > Im playing around with the tmediaplayer and am wanting to play a video > in a second window, but I want to update the initial form with a time > remaining > > when I play the video though ir locks the form until the video stops > (I believe cause I use the wait procedure of the tmediaplayer) > > but I need the wait as people can choose to play two videos and I want > them to be able to, instead of skipping to the last one only. > > I looked at threads for this but this also locks the form. > > any thoughts how I can do this? > > Cheers _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
