From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Boolean )
aDesktopMoviePlayer.AutoAdjustToMovieSize = newBooleanValue
BooleanValue = aDesktopMoviePlayer.AutoAdjustToMovieSize

New in 2021r3

Supported for all project types and targets.

If True, the DesktopMoviePlayer control resizes itself to fit the size of the movie. The default is True.


Because movie loading is asynchronous, you should not have AutoAdjustToMovieSize = True if you are also manually modifying the Width and Height as it is possible that the auto resizing will occur after you have changed the size.

Sample Code

This example turns off AutoAdjustToMovieSize.

Var f As FolderItem
f = FolderItem.ShowOpenFileDialog(FileTypes1.VideoMp4)
If f <> Nil Then
MoviePlayer1.AutoAdjustToMovieSize = False = Movie.Open(f)
End If