# Creating a user control that draws a line in vb.net



## titanalive (May 20, 2007)

Hi guys. Ok does anyone know how to create a user control that allows us to draw lines on a windows form in vb.net 2003/2005, similar to the line control in vb6 at design time. I have been searching the web left right center but have failed to find any concrete result. Is anyone has any idea please help me out i really need it for designing purposes.

Thanks


----------



## titanalive (May 20, 2007)

Aw come on guys there must be something that can be done to draw a stupid line on the user interface in the vb.net form, if not a user control. Just suggest some way to do it. If anyone could even guide me to a link would be greatful on that too. I really need to know how to do this.


----------



## pvc_ (Feb 18, 2008)

GDI+
basically you are gonna have to use the graphics property of your form, and draw a line. It would give you an option like DrawLine(X1, Y1, Width, Height) and you just draw the line. I wish I could be more specific, but my pc is having problems and I dont have visual studio installed on it. Simply search for gdi+, pretty simple stuff.


----------

