Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Progress form not refreshing in runtime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01092609
Message ID:
01092628
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Dawa,

You might want to replace your call to the form's refresh with a call to the RedrawWindow api:
#DEFINE RDW_INVALIDATE          0x0001
#DEFINE RDW_INTERNALPAINT       0x0002
#DEFINE RDW_ERASE               0x0004
 
#DEFINE RDW_VALIDATE            0x0008
#DEFINE RDW_NOINTERNALPAINT     0x0010
#DEFINE RDW_NOERASE             0x0020
 
#DEFINE RDW_NOCHILDREN          0x0040
#DEFINE RDW_ALLCHILDREN         0x0080
 
#DEFINE RDW_UPDATENOW           0x0100
#DEFINE RDW_ERASENOW            0x0200
 
#DEFINE RDW_FRAME               0x0400
#DEFINE RDW_NOFRAME             0x0800
 
DECLARE INTEGER RedrawWindow IN WIN32API INTEGER hWnd, INTEGER nUpdateRect, INTEGER nUpdateRegion, INTEGER nFlags

RedrawWindow(m.oForm.HWnd, 0, 0, RDW_INTERNALPAINT + RDW_UPDATENOW)
I added that to my progress bar form and it ran MUCH smoother. You may be able to get rid of most of the autoyield and doevents stuff, too.

HTH,
Chad


>Hi all,
>
>I have a form that shows progress of a scan statement.
>
>
>_vfp.autoyield = .f.
>oform = newobject('cprogress','utilities.vcx',iif(_vfp.startmode>0,_vfp.servername,""))
>m.oform.show
>m.oform.lockscreen = .f.
>m.oform.setminmax(0,reccount('bilfile'))
>select bilfile
>scan
> m.lncount = m.lncount + 1
> m.oform.setprogressvalue(m.lncount)
> m.oform.visible = .t.
> m.oform.refresh()
> doevents
> &&process ...
>endscan
>_vfp.autoyield = .t.
>
>
>It all works fine in dev mode, but I get blank screen at runtime.
>
>What is going on?
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform