Guys:
How can I display a meter and update it when my program is working in a long, tedious DO..WHILE loop ? Thank you.
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oMeter
LOCAL nActual := 0
LOCAL nTotal := 10000
LOCAL oButton
DEFINE DIALOG oDlg
@ 1 , 1 BUTTON oButton PROMPT "Start Meter" ACTION ( nActual := 0 , ;
startloop( oMeter , nActual, nTotal ) )
@ 3 , 1 METER oMeter VAR nActual TOTAL nTotal OF oDLg SIZE 140 , 10
ACTIVATE DIALOG oDlg ON INIT oMeter:settotal( nTotal )
RETURN NIL
FUNCTION STARTLOOP( oMeter, nActual, nTotal )
LOCAL i := nActual
DO WHILE i <= nTotal
oMeter:set( i )
i ++
ENDDO
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 83 guests