I have got a window, wherein a movieplayer plays a movie.
Is there any possibility to detrmine, wether the film has ended, so that I can close the window automatically?
I have got a window, wherein a movieplayer plays a movie.
Is there any possibility to detrmine, wether the film has ended, so that I can close the window automatically?
In OSX I used always
if Movieplayer1.Position = Movieplayer1.Duration then
// your code
End If
In Windows it has never worked properly.
thx - but which event did you use?
That is probably in a timer. Although I have never used the MoviePlayer, the Stop event looks like it might be fired when the movie has ended, in which case you could close the window then.
Stop Event
The Stop Event fires also when you stop the movie.
therefore the line - if Movieplayer1.Position = Movieplayer1.Duration then
does n’t work, but in the play event I can ask for the duration an dI will try to install a timer
This worked: (in the play event of the movieplayer)
timer1.mode=Timer.ModeSingle
timer1.period=(MoviePlayer1.duration+1)*1000