Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last Time. Shape won't appear on form
Message
 
To
17/04/2008 15:15:25
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01311513
Message ID:
01311570
Views:
12
Jay,

>One array is for the shape of the form. Not the same thing. This was working great until I did something and broke it.


Still, did you try to use percentages? That is what you should be using, not absolute coordinates, take a look at the example, run it first with lnScale = 1 and then lnScale = .3333 to see what I am trying to say
loForm				= NEWOBJECT("myForm")
loForm.Show(1)

DEFINE CLASS myForm AS Form


	DoCreate = .T.
	Name = "Form1"

	ADD OBJECT shape1 AS shape WITH ;
		Top = 33, ;
		Left = 71, ;
		Height = 176, ;
		Width = 268, ;
		PolyPoints = "thisform.aPoints", ;
		Name = "Shape1"


	PROCEDURE Load
		this.AddProperty('aPoints(1)')

		DIMENSION this.aPoints[4,2]

		lnScale = 1 && Change to 0.33333 for a second run and to 2 for a third

		this.aPoints[1,1] = 0 * lnScale
		this.aPoints[1,2] = 0 * lnScale
		this.aPoints[2,1] = 100 * lnScale
		this.aPoints[2,2] = 0 * lnScale
		this.aPoints[3,1] = 100 * lnScale
		this.aPoints[3,2] = 100 * lnScale
		this.aPoints[4,1] = 0 * lnScale
		this.aPoints[4,2] = 100 * lnScale
	ENDPROC
ENDDEFINE
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform