Link to home
Start Free TrialLog in
Avatar of Dodger42
Dodger42

asked on

horizontal line in c# forms

Hey all,

A real basic question I presume. I simply want to draw horizontal lines on my forms for formatting and neatness on my GUI.

I got the drawing toolbar up, but it is always greyed out.

Suggestions?

Thanks.
Avatar of strickdd
strickdd
Flag of United States of America image

You could draw a picture box and set the background color to black if you want... That's the best thing I can think of right now, but I'll look more into it.
SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dodger42
Dodger42

ASKER

Thanks IM, that is close, but its quite clunky. Grabbing and dragging the flattened label is akward. Surely there is another way. In vs2005, if you go to options, you can see the sort of horizontal line I mean above the OK, Cancel buttons.

I know it's clunky and a pain in the arse to move around...

Unfortunately there just isn't a plain old line control included in .Net!

Sorry...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can draw lines in the Paint event using GDI+, but that may be just as "clunky".

Bob
Thanks all. I guess there are several answers which get a solution. I'm shocked given the frequent use of lines in forms, that MS havent included a control even after all these years of forms design.

So am I.  =)

The lowly VB6 had a line control (also a rectangle and ellipse control wrapped in a Shape control) that many people miss after moving to VB.Net