Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Image Loading ?

Status
Not open for further replies.
Oct 23, 2002
57
0
0
US
Like a student I need someone to point me in the right direction here. What I am wanting to do is to have a form randomly select an image (from a say a total of 5) and load it in a ole frame/box. Is this possible and if so what kind of coding would be needed to pull this off. I don't want anyone to do my "homework" for me but some more experienced person to point out the sytle of coding and "function/commands" that would be needed to do this. I'll do the rest.

thanks thanks thanks thanks thanks thanks thanks thanks thanks again.
 
yes it is possible

try looking at the rnd function and multiply it with 5 and then use the int function now you will have a number from 1 to 5 if your lucky

then to change the image in an image control (no not ole) (you dont need an ole control for images)

image.picture = "c:\name\name.jpg"
"What a wonderfull world" - Louis armstrong
 
Thank you for the direction, it is greatly appreaciated.
I will look into it here shortly.

thanks again chrissie1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top