Results 1 to 9 of 9

Thread: can this be done??

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Ireland
    Posts
    33

    Unhappy

    Can anyone Help?
    I want to draw a line between the points which i have assigned to an array. Can this be done??

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    yes
    -Shickadance

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Ireland
    Posts
    33
    Thanks 4 u're reply Mr.ShicKadance
    can u help me??
    coolcat

  4. #4
    Guest
    Use the Line method.
    Code:
    Form1.Line (100, 100)-(500, 500)

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Ireland
    Posts
    33

    Wink How DO I??

    How do I insert the variables into the line method??

  6. #6
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    Sure.

    Code:
    '' assume we want to draw to Me.PicPlot picture
    '' assume we have an Array called Arr()
    '' where the X value is determined by the index
    '' where the Y value is determined by the value @ the index
    
    Dim i as Integer
    Dim LastX As Integer
    Dim LastY As Integer
    
    
    LastX = LBound(Arr)
    LastY = Arr(LBound(Arr))
    
    For i = (LBound(Arr) + 1) To UBound(Arr)
    
      '' make a black line
      Me.PicPlot.Line (LastX, LastY) - (i, Arr(i)), vbBlack, BF
      '' store the current X,Y
      LastX = i
      LastY = Arr(i)
    
    Next i
    -Shickadance

  7. #7

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Ireland
    Posts
    33

    Smile

    Thanks Shickadance - I'll try it!!!

  8. #8
    Guest

    Re: How DO I??

    Originally posted by coolcat
    How do I insert the variables into the line method??
    Code:
    Line (X1, Y1)-(X2-Y2)

  9. #9
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    you can use the PolyLine API function as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width