Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up DoEvents()
Message
De
02/10/1998 00:14:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00142550
Message ID:
00143110
Vues:
34
>David,
>
>
* FastDoEvents.prg 30-Sep-98
>
>* this workaround speeds up a DoEvent call
>
>local lnRow, lnCol, lcWindow
>
>lcWindow = wontop()
>lnRow = mrow( lcWindow )
>lnCol = mcol( lcWindow )
>if ( lnRow > 0 ) and ( lnCol > 0 )
>   * mouse still within VFP window, so it's ok to mouse
>   mouse at mrow(), mcol() window (lcWindow)
>endif
>
>DoEvents()
>
>So if you come up with any improvements/fixes to the above code I'd appreciate hearing about them.
>
Hi Frank,
The code works fine except where there's no wontop() so you need something like
Procedure DoEventsFast
local nRow, nCol, cWindow
cWindow= wontop()
nRow= mrow(m.cWindow)
nCol= mcol(m.cWindow)
if m.nRow>0 and m.nCol>0
	* mouse still inside VFP window, so ok to mouse
	if empty(m.cWindow)
		mouse at m.nRow, m.nCol 	&& window (m.cWindow)
	else
		mouse at m.nRow, m.nCol window (m.cWindow)
	endif
endif
doevents()
Now I've use m.nRow instead of another call to MROW(). Is that bad or good :-)
Regards
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform