P prolessskill Member Nov 1, 2020 #1 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.
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.
Erel B4X founder Staff member Licensed User Longtime User Nov 2, 2020 #2 Of course. Add an ImageView to the Form and set the image. Upvote 0
P prolessskill Member Nov 2, 2020 #3 Erel said: Of course. Add an ImageView to the Form and set the image. Click to expand... Thanks, but how do I make it pick an image randomly? Upvote 0
Erel said: Of course. Add an ImageView to the Form and set the image. Click to expand... Thanks, but how do I make it pick an image randomly?
DonManfred Expert Licensed User Longtime User Nov 2, 2020 #4 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: Nov 5, 2020 Upvote 0
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.