How to draw lines in the forms ?

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

in vb.net , any tools can draw a line the the form ??
or rectangle box ?

Thanks
Form Agnes
 
* "Agnes said:
in vb.net , any tools can draw a line the the form ??
or rectangle box ?

Override the form's 'OnPaint' method and add the drawing code there:

\\\
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
e.Graphics.DrawLine(...)
e.Graphics.DrawRectangle(...)
ByBase.OnPaint(e)
End Sub
///
 
you will have to use the System.Drawing namespace to access lines and
shapes, there is no longer "tools" for shapes anymore because they were not
true controls in the past...
 
Back
Top