Hi

 

I have an app with a countdown timer to shut down.  The code is as shown
below (white space removed):

 

LOCAL lcMessageText

DECLARE Sleep in Win32API ;

  integer nMilliseconds

WITH ThisForm

      .cmdCancel.enabled = .F.

      .Countdown = Control.Countdown

      IF .ShutdownFlag = .T.

            lcMessageText = 'Shutting down in '

      ELSE 

            lcMessageText = 'Closing the Membership system down in '

      ENDIF 

      *&* This is the message that doesn't display

.lblTimer.Caption = lcMessageText + ALLTRIM(STR(.Countdown)) + ' seconds'

      .Refresh

      DO WHILE .Countdown > 0

            Sleep(5000)

            .Countdown = .Countdown - 5

            .lblTimer.Caption = lcMessageText + ALLTRIM(STR(.Countdown)) + '
seconds'

            .Refresh

      ENDDO 

*!*         IF .ShutdownFlag = .T.

*!*               RUN Shutdown.exe /s /f /t 10

*!*         ENDIF 

      .Release

      CLEAR EVENTS

ENDWITH 

 

My problem is that the message before the DO WHILE loop doesn't display.
The code is in the Click event of a button.  When I press the button nothing
appears to happen for about 20 seconds then the messages in the loop are
displayed.  It then works as planned.

 

Is there any way I can force the system to display the message?

 

Thanks

 

John

 

John Weller

01380 723235

07976 393631

 



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/004c01d5545e$87eea280$97cbe780$@johnweller.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to