How to draw lines in the forms ?

A

Agnes

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

Thanks
Form Agnes
 
H

Herfried K. Wagner [MVP]

* "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
///
 
B

Brian Henry

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top