vb 2015 line on a form

How do i place a line across the window in vb 2015.. ?  In the older versions there was a line control object.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
Do not look for a Line control, there is none.

There used to be a Visual Basic PowerPack that contained .NET equivalent of the "missing" controls for programmers who switched from VB6, but I am not sure that there is still one for newer versions of Visual Studio. And anyway, I discourage my students from using these. Learn to work the .NET way instead of using "patches" over .NET to make it look like VB6. You will be better off in the long run and will be able to easily make the switch to another .NET language if the need arise.

You can always do it in code by using the Graphics.DrawLine method, but it requires getting used to work with graphics in .NET, something that is not intuitive. It's not worth the trouble of learning these, unless you think that you will eventually have to draw your own stuff on the screen.

The easiest way to do it is with a Label without Text, with a BorderStyle set to FixedSingle, AutoSize set to False, and a Width or Height of 1 or 2 depending on the orientation and the thickness you desire.

If you want a thicker line, increase the size and set the BackColor so as to fill the rectangle that is produces.

There is no way to control the color of the result or to draw something such as a dotted line, so if it is what you are after, then your best bet is to consult the documentation for the DrawLine method.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Éric MoreauSenior .Net ConsultantCommented:
HalCHubAuthor Commented:
I found it in vb add on..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.