Re: Form Timer issue in Access Game

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kelvin (klu_at_klu.com)
Date: 03/05/04


Date: Fri, 5 Mar 2004 13:36:36 -0800

Howabout instead of using a timer after the second box is revealed, using
the OnTimer event to check if the text box is showing then increment some
global variable. At some point, in a later OnTimer event, check the value
of this variable then blank out the text boxes.

Kelvin

"Jeff Conrad" <jeffc@ernstbrothers.com> wrote in message
news:%23thTFQvAEHA.1516@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> Using Access 97 here.
>
> I finished making a game in Access, but there is just one residual issue I
> have a question about. I can live with this problem, but I'm wondering if
> there is a work-around.
>
> As the game is in progress a "clock" on the form displays the elapsed time
> like a stop watch. The game is a matching game. If you select two
un-matched
> tiles you see the value in the text box for just a spilt second so
hopefully
> you remember where it is.
>
> In order to accomplish this I had to code the second box like so:
>
> ' No match so wait just a spilt second to enable
> ' the user to see the two values
> For Counter = 1 To 2000000
> ' Set a small counter loop
> If Counter = 100000 Then
> ' Pause so we can see it
> DoEvents
> End If
> Next Counter
>
> I had to add in the DoEvents line because no matter HOW big of a number I
> put in to the Counter you were never able to see the second box! Not good.
> Adding in the DoEvents line makes it work perfect, but there is one side
> effect: the stopwatch timer on the form pauses for just a spilt second.
Now
> I *can* live with this, but is there any way to have the best of both
> worlds: keep the stopwatch going AND be able to see the text box for just
a
> bit? Probably not, huh?
>
> Thanks,
> Jeff Conrad
> Bend, Oregon
>
>



Relevant Pages

  • Re: Form Timer issue in Access Game
    ... After the second text box is revealed I don't use the Timer Event at all. ... If I don't put in the DoEvents line, the second text box is never revealed. ... At some point, in a later OnTimer event, check the value ... The game is a matching game. ...
    (microsoft.public.access.forms)
  • Re: Timer issue
    ... You can still put the timer logic in the Game class. ... If client get into the game before timer trigger, then good, otherwise ... | the server at this stage, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Timer issue
    ... instantiate timer on the server ... clients on receiving the timespan object start their timers ... the server at this stage, ... when server hits 0 send the start game to all clients ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Adding a timer to EM to turn it off
    ... many 30's Bally games had this feature. ... Anyway, at the end of the game, there was a timer ... relay, or some other way to turn off most of the lamps. ...
    (rec.games.pinball)
  • Re: Thread Terminate
    ... In article, Mark Payton wrote: ... > I have a number of threads which contains a timer which performs a process ... A TTImer will not work in a secondary thread since it needs a message loop. ... form at design-time) its OnTimer event will execute in the main thread as ...
    (borland.public.delphi.nativeapi)