Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
(Not responding) in Titlebar
Message
De
03/12/2003 13:18:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00855276
Message ID:
00855533
Vues:
13
Hi Eric,

except for the tons of bugs, with VFP you can write a O.S. .

For INTERACTIVE SQL SELECT try this:
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


DEFINE CLASS form1 AS form

	Caption = "Form1"
	Name = "FORM1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 18, ;
		Left = 98, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "STANDARD", ;
		Name = "Command1"

	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 54, ;
		Left = 99, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "INTERACTIVE", ;
		Name = "Command2"


	PROCEDURE checkevent
		LPARAMETERS interactive
		* THIS SIMULATE A INTENSIVE JOB
		FOR JU=1 TO 1000
		NEXT
		IF m.interactive
			DOEVENTS
		ENDIF
	ENDPROC


	PROCEDURE command1.Click
		CREATE CURSOR TEST ( IH i )
		FOR JU=1 TO 200000
			APPEND BLANK
		NEXT
		SELECT * FROM TEST WHERE THISFORM.Checkevent() INTO CURSOR TEST NOFILTER

		USE
	ENDPROC


	PROCEDURE command2.Click
		CREATE CURSOR TEST ( IH i )
		FOR JU=1 TO 200000
			APPEND BLANK
		NEXT
		SELECT * FROM TEST WHERE THISFORM.Checkevent(.T.) INTO CURSOR TEST NOFILTER

		USE
	ENDPROC

ENDDEFINE
Click on standard, VFP no respond to the input, and not fire timers events.

Click on interactive, VFP respond to the input, and you can
- move/minimize/maximize the form .....

This method have a penalty for call routine
( you can put a MOD(RECNO(),1000)=0 for implement a neutral skipping filter ).

If you seem interesting, read the Wish #1407
( if VFPT implement it, you can have a full control when SELECT running without
panalty ( <0.1% )

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform