wait dialog

wait dialog

Postby Maverich » Tue Oct 11, 2005 9:59 am

I'd like to have a dialog with a TAnimate object (example the copy files di windows) during massive dbf operations. The animation doesn't start, the only way to make it move is placing various sysrefresh() during dbf operations. Is there any other way?

this is the code:

Code: Select all  Expand view
#include "fivewin.ch"

function main()
   local a
   
   attendi(.t.)
   inkey(3)  // this way doesn't move
   attendi(.f.)
   
   attendi(.t.)
   for a=1 to 200  // this way it moves!!!
      inkey(.01)
      sysrefresh()
   next
   attendi(.f.)
return nil

FUNCTION Attendi( lStatus )
   STATIC oDlg
   LOCAL oAnimate

   IF lStatus .AND. oDlg = NIL
      DEFINE dialog oDlg resource "Main"
      oAnimate = TAnimate():REDEFINE( 160, oDlg )

      ACTIVATE dialog oDlg NOWAIT centered ;
      ON INIT ( , oAnimate:CopyFiles(), oAnimate:Play() )
   ELSE
   oDlg:END()
   oDlg = NIL
ENDIF

RETURN NIL


regards
riccardo
Riccardo
User avatar
Maverich
 
Posts: 31
Joined: Sun Oct 09, 2005 8:29 pm
Location: Prato, Italia

Postby Antonio Linares » Tue Oct 11, 2005 11:26 am

Riccardo,

SysRefresh() is required in order to let Windows process pending messages.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 37 guests