[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DelayKey                                                        KeyTTT



Purpose   To pause while user presses key or a specified time period
          elapses.

Declaration    DelayKey(Time: integer);

          Time is the maximum pause in seconds.

Uses CRT, DOS, KeyTTT.

Remarks   This is one of my favorites. The system pauses until a key
          is pressed or, if a key isn't pressed, until a specified
          time has elapsed.

          Very useful for temporarily displaying messages, copyright
          screens etc. As soon as the user presses a key (or there is
          mouse activity) the procedure ends.



Example


               USES CRT, DOS, KEYTTT;
               BEGIN
                 DISPLAY_HELP;      {SOME EARLIER DEFINED PROCEDURE}
                 DELAYKEY(5);
                 CLRSCR;
               END.


A help screen is displayed for up to 5 seconds or until a key is
pressed.

See Also: GetKey
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson