B4J Question Random picture background

Hello,

Is it possible to pick a random picture from uploaded files and set it as the form's background? Seems simple but I have searched and didn't find anything. Help is appreciated.
 

DonManfred

Expert
Licensed User
Longtime User
Get all files from a Folder (File.Listfiles), create a Randomnumber between 0 and the images.Count-1 (Dim random As Int = Rnd(0, 101)

Use the entry random from the list.
 
Last edited:
Upvote 0
Top