I have 15 pictures (each named 1.jpg, 2.jpg, 3.jpg, etc) and I want load one of them randomly into an Imagewell. How would I write the code to do this?
dim r as new random // this should be global and not created each time
dim n as integer = r.InRange(1,15)
dim fname as string = str(n)+ “.jpg”
dim f as new FolderItem = GetFolderItem(fname)
ImageWell1.Image = Picture.Open(f)
Works! I actually was sort of close with it, but got stuck. Tim, you’re a Xojo samurai!