Here are 4 different methods that can be used:
Option 1 : Install Visual Basic Power Packs
https://www.microsoft.com/en-us/download/details.aspx?id=25169Option 2 : Use a drawing program like Paint, InkScape, Adobe Illustrator, etc to draw all of the line/shapes you want in a single image. Export the drawing to a PNG file. Add the image to a Panel or make it the Form background
Option 3 : Add a Label to the form. Set the Backgound color to the line color you want. Set the width or height to the line thickness
Option 4 : Use GDI+ drawing via code. For example, add this code to your form:
Protected Overrides Sub OnPaint(e As PaintEventArgs)
MyBase.OnPaint(e)
e.Graphics.DrawLine(Pens.Red, 0, 0, 100, 100)
End Sub
Option 1 is probably the easiest, but least portable to other machines that do not have the Power Packs installed.
Option 2 is my preference because of the flexibility I can get. In the Application Showcase, I recently posted some screenshots of a press HMI that uses this technique.
Option 3 only allows vertical and hortizontal lines.
Option 4 is typically used by professional code writers and requires a reasonable amount of knowledge of GDI+