Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Draw lines
Message
From
20/03/2005 06:30:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
20/03/2005 06:06:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00997659
Message ID:
00997665
Views:
14
I forgot to mention; for a quick test (experiment), I put all the code in Form.Init(). Of course, you will have to decide eventually when you want to execute the code, for example, in a Button.KeyPress(), or with a Timer.

Here is another example, with a Timer, which will draw the sine curve slowly.

Create form properties .x = 0, .y = 0, .i = 0, and place the following code into the Timer.Timer Event:
with ThisForm
	.i = .i + 0.05
	.x = .i*100
	.y = sin(.i)*100 + 100
	.Line(.x, .y)
	if .i >= 2*pi()
		This.Enabled = .F.
	endif
endwith
I know, it is not perfect; this is just a quick sample. I'll leave the details to you.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform