Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing shapes
Message
 
À
24/08/2005 13:09:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01043393
Message ID:
01043584
Vues:
9
Just as a test, I wrote this small form, that works as expected (I never expect to much from my code just in case <g>), the only difference with yours, appart of the things I mentioned in other post, is the place where I make the call (I create teh shapes in the init, I am not sure from where you call your method, and the sys() reference, I did not give much thought about that, I guess it comes from another thread, but anyways, it should not matter.
PUBLIC oform1

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


	**************************************************
*-- Form:         form1 (c:\shptest.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   08/24/05 01:23:00 PM
*
DEFINE CLASS form1 AS form

	DoCreate = .T.
	Caption = "Form1"
	*-- XML Metadata for customizable properties
	_memberdata = ""
	Name = "Form1"
	ShowTips = .t.

	PROCEDURE addcircles
		local lcObjName, lnObjNo

		lnObjNo		= 0
		scan
			lnObjNo		= lnObjNo + 1
			lcObjName	= 'Shp' + Transform(lnObjNo, '@L 9999999999')
			Thisform.NewObject(lcObjName, 'Shape')
			with Evaluate('Thisform.' + lcObjName)
				.Move(myCircles.XX, myCircles.YY, 25, 25)
				.Curvature	= 99
				.BackColor	= myCircles.CL
				.BackStyle	= 1
				.BorderWidth	= 2
				.BorderColor	= 65535
				.SpecialEffect	= 0
				.ToolTipText	= lcObjName
				.Visible	= .T.
			Endwith
		endscan
	ENDPROC


	PROCEDURE Init
		local lnCircle

		Rand(-1)

		create cursor myCircles ;
				( ;
					XX I default thisform.Width * Rand(), ;
					YY I default thisform.Height * Rand(), ;
					CL I default Rgb(255,255,255) * Rand() ;
				)

		for lnCircle = 1 to 100
			append blank
		next lnCircle

		thisform.addCircles()
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform