Hide Picture boxes made at runtime after a selected time
Posted on 2006-04-05
I have a main menu that lets you choose the face time of targets.
When the 'game' is started, the targets will pop out and should stay out for the face time.
A timer calls a function and every time it is called, it creates a target box with the name pct_Target_X. Where X is an increasing integer.
I need to close these targets when they have been visible for the face time.
So if the face time is 3.0s, and pct_Target_0 appears, it will close again after 3.0s.
However, pct_Target_1 and pct_Target_2, etc can appear while pct_Target_0 is still showing. Meaning the original timer cant be used to just show 1, hide 1, show 1, hide 1.
To sum up, i need to know how to make the picture boxes invisible after they have been created after the set time. I also cannot specify this in hard code, as the number of picture boxes is completely down to the user. I wont ever know what X will get up to. I could have pct_Target_9999999999999999! Resources allowing of course :p.
Thanks in advance for help!