Results 1 to 2 of 2

Thread: Draw a Line

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Glasgow, Scotland
    Posts
    71

    Draw a Line

    Hi,

    Felling a bit silly, where is the line control on VB .Net, can not see it in the toolbox, have they changed the name???

    Help,

    Chris

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    The line and shape controls doesn't exist anymore.
    You have to all the drawing yourself.

    Use the Paint event of whatever control you wish to draw the line to.

    VB Code:
    1. Public Sub Paint(Byval sender As Object, e as PaintEventArgs) Handles MyBase.Paint
    2.     e.Graphics.DrawLine(Pens.Black,0,0,100,100)
    3. End Sub
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

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