automaticaly play all videos from a folder

how do i automaticaly play all videos from a folder?
target platform–> desktop windows 10

have you figured out how to play ONE?…Next

i play one using this code

Dim f As FolderItem f = SpecialFolder.Desktop.Child("videos").Child("Bruno Mars Just The Way You Are lyrics .mp4") MoviePlayer1.Speaker = True MoviePlayer1.HasStep = False MoviePlayer1.Movie = f.OpenAsMovie MoviePlayer1.Play
but i want to automaticaly play all videos from a folder, randomly if possible

I’ve provided links that cover many things you’ll need to look up while implementing this. There is even example code on the FolderItem page that covers how to list all the items in a directory.

Keep in mind that MoviePlayer.Stop fires immediately after loading a movie into it on Windows, so you’ll have to manually track the end of the movie and move to the next.

Load the items you want to play into an array, use a Timer to check if the current movie has finished playing, then play the next through the array until you have played them all.

The Raspberry Pi tutorial on how to make an app that can play music files from a folder might be a good start:

I have solved it as follows:
1- in a listbox with two columns I keep in a column an autoincremental id, and in the other the complete name of each file
2- With the random function I choose a random id, I read the file name corresponding to that id and I reproduce it
@Paul Lefebvre the raspberry pi tutorial is great, thanks
@Tim Parnell thanks for your great guide
@Dave S your question gave me a tip of the ball to start with. Then it was just a matter of creating the algorithm to select which file to play