View Single Post
  #4 (permalink)  
Old 11-17-2007, 10:56 AM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 15,688
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Works fine here (don't forget to create a form named Form1).
Code:
Sub Globals
    
'Declare the global variables here.
    Dim x(3),y(3)
End Sub

Sub App_Start
    x(
0)=0 :y(0)=0 :x(1)=0: y(1)=100: x(2)=200: y(2)=100
    form1.polygon(x(),
0,y(),0,3,cRed)
    Form1.Show
End Sub
I prefer to use a structure:
Code:
Sub Globals
    
'Declare the global variables here.
    Dim Type(x,y) points(3)
End Sub

Sub App_Start
    points(
0).x = 0
    points(
0).y = 0
    points(
1).x = 0
    points(
1).y = 100
    points(
2).x = 200
    points(
2).y = 100
    form1.polygon(points(),
0,3,cBlue)
    Form1.Show
End Sub
Reply With Quote