Calibration page on startup then times out

Discussion in 'Pascal Logic Code Examples' started by Trevor, Mar 25, 2026 at 10:12 PM.

  1. Trevor

    Trevor

    Joined:
    Nov 22, 2018
    Messages:
    541
    Likes Received:
    46
    Location:
    Melbourne Victoria
    Hi All,
    I'm trying to make a Calibration Page that times out after 30 seconds, this part is ok, i would like to add an onscreen count down time to this screen showing how long before the page closes and your returned to the Welcome Screen...See code below. It's mostly working except that the onscreen countdown just keeps overwriting the same place, and it goes to the Welcome screen after about 2 seconds.
    Any help is always appreciated.

    Code:
     If ShowingPage("Calibration Page") then Begin
     
     TextPos(335, 373);
     SetFontSize(20);
     
     DrawText('', 60 - TimerTime(3));
     Delay(1);
     If timertime(3) = 0 then;
    
    ShowPage("Welcome Screen")
    
     end
     

    Attached Files:

    Trevor, Mar 25, 2026 at 10:12 PM
    #1
  2. Trevor

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,621
    Likes Received:
    204
    Location:
    Adelaide, Australia
    DrawText only writes the foreground. You need to erase the background first by drawing a filled rectangle.

    The semicolon is terminating the if statement. Remove it.
     
    Ashley, Mar 25, 2026 at 10:59 PM
    #2
  3. Trevor

    Trevor

    Joined:
    Nov 22, 2018
    Messages:
    541
    Likes Received:
    46
    Location:
    Melbourne Victoria
    Thanks Ash,
    I did look for the commend to erase the background but couldn't find anything to do it...

    Oops missed that,
    Will do that background square now...
     
    Trevor, Mar 25, 2026 at 11:03 PM
    #3
  4. Trevor

    Trevor

    Joined:
    Nov 22, 2018
    Messages:
    541
    Likes Received:
    46
    Location:
    Melbourne Victoria
    Yep, so far so good, thanks Ash.
     
    Trevor, Mar 25, 2026 at 11:16 PM
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.