Results 1 to 4 of 4

Thread: Drawing a line

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    81

    Talking

    Hey fellers,

    I want to draw a line in a picture box. How do I do it!?!?! I could use the SetPixelV API call but surely there's an easier way to do it. Is there an in-built function that can just draw a line from (4,40) to (20,80) for instance?

    Cheers in advance,

    Sam

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    add 1 picture and a line to your form

    then CUT the line and PASTE it into the picture box

    therefore, the line will be in the picture box
    NXSupport - Your one-stop source for computer help

  3. #3
    Guest
    Or use the PictureBox's line (function/control/sub/property?)

    Code:
    'Customize to fit your needs
    Picture1.Line (2000, 300)-(100, 300), RGB(0, 0, 255)

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    81

    Thumbs up Thanx!

    Dimava, that works but I need to draw lines at runtime. Therefore Matthew's reply is exactly what I'm looking for. I knew the Line event of a picture box existed but I didn't know how to use it. Cheers for the help guys!

    Sam

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