the timer loadsan image and stay as is during 5 seconds (or more). If you press a key, it will be ignored until the current “wait” time is ellapsed. This is implemented and works as I explain.
To make the above working when a key is depressed, I need to shorten the display time to the point the reader do not have time to watch the image…
Using a second timer that runs during the time the first one waits (used to poll the keyboard) would allow a responsible key (with a low value, say 50 ?).
Good idea, but if I press the space bar, the idea is to stop (until another press) the timer (so the image on screen stays the same);
Left Arrow: Display the previous image
Right Arrow: Display the next image,
Top Arrow:First image / Bottom Arrow: Last image…
I don’t know what you mean by “a timer inside a timer”. I have several timers going at once, one is once a minute, another is once an hour. These are for different purposes. If you need more than one timer with different intervals, I’m not aware of any issues in doing that.
This kind of design idea comes from the ability to place a Timer object on a Window. If you look at the objects like items on the window, one might think they can put a Timer inside a Timer.
Having seen this array of timers in a project once, I despise the “just add another timer” approach to solving problems.
It sounds like a Canvas to display the image, a KeyDown handler to control playback, and a timer to switch the image on time. The KeyDown handler can adjust the timer period or start/stop/reset it if necessary.
Edit: This forum software tries too hard sometimes. This is meant as a general reply to Emile and I was not able to clear that.