Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Irregular Shapes
Message
 
 
To
16/04/2008 23:03:37
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:
01311340
Message ID:
01311352
Views:
26
The array has to be in scope all the time. You can make it a property of the form
frmMyForm = CREATEOBJECT('myForm')
frmMyForm.Show(1)

DEFINE CLASS myForm as Form
	DIMENSION lapoints[1]

	PROCEDURE Init
	WITH Thisform
		DIMENSION .lapoints[9,2]
		.lapoints[1,1] = 50
		.lapoints[1,2] = 0

		.lapoints[2,1] = 400
		.lapoints[2,2] = 0

		.lapoints[3,1] = 425
		.lapoints[3,2] = 25

		.lapoints[4,1] = 425
		.lapoints[4,2] = 100

		.lapoints[5,1] = 400
		.lapoints[5,2] = 125

		.lapoints[6,1] = 50
		.lapoints[6,2] = 125

		.lapoints[7,1] = 25
		.lapoints[7,2] = 100

		.lapoints[8,1] = 25
		.lapoints[8,2] = 25

		.lapoints[9,1] = 50
		.lapoints[9,2] = 0

		.AddObject('shpIrregular','Shape')
		WITH .shpIrregular
			.Top = 25
			.Left = 25
			.FillStyle = 0
			.FillColor = RGB(0, 255, 255)
			.PolyPoints = "Thisform.lapoints"
			.Visible = .T.
		ENDWITH
	ENDWITH

	ENDPROC

ENDDEFINE
>I ran your code and it works great. I put it in the init of my form and it does not display the shape. It will have to wait until the morning.
>
<snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform