Delphi IDE (89)
Windows with Delphi (280)
Visual Basic (1)
Resizing and changing borderstyle of TMediaPlayer while a movie is playing
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:Resizing the video display using the diaplayrec property of the mediaplayer is no problem, but if I try to change the borderstyle of the display form the movie stops playing.
I am trying it with the following code snippet (assume the current borderstyle is bsSizeable):
Answer:When the switching the border on or off, the window is recreated so it has a new handle. I have solved the problem in the past by stopping the player before changing the border and restarting it after changing it.