Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / February 2006

Tip: Looking for answers? Try searching our database.

Windows Froms 2.0 Horizontal Rule

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Josh Crosby - 21 Feb 2006 17:11 GMT
I have searched high and low, tryed a picture box, 3D border, etc... doesn't
appear right, can someone help me with this, i'm sure it's really simple. How
do you put a horizontal rule, or seperator bar on a windows form, i.e. those
that are most commonly seen on dialog boxes.

Thanks in advance.

Signature

Josh Crosby

Tim Wilson - 21 Feb 2006 18:40 GMT
Sounds like you've tried creating a line using other controls with a 3D
border - which is one option.

However, if that's not turning out as you'd expect, another option is to
override the OnPaint method of the Form and use the ControlPaint class to
draw a border-style line
(http://msdn2.microsoft.com/en-us/library/system.windows.forms.controlpaint_
members.aspx).

A third option is to go through this
(http://www.codeproject.com/cs/miscctrl/hvrules1.asp) article and see if you
can use the controls that are developed.

Signature

Tim Wilson
.NET Compact Framework MVP

> I have searched high and low, tryed a picture box, 3D border, etc... doesn't
> appear right, can someone help me with this, i'm sure it's really simple. How
> do you put a horizontal rule, or seperator bar on a windows form, i.e. those
> that are most commonly seen on dialog boxes.
>
> Thanks in advance.
Josh Crosby - 21 Feb 2006 20:17 GMT
Thanks Tim,
I had another post from EE, which turned out pretty easy. thought i'd post
it as well.

Add a Label.
Set the AutoSize to False.
Set its BorderStyle to FixedSingle.
Adjust to your liking.
Set the Height to 1 in the Size property "180, 1".

Signature

Josh Crosby

> Sounds like you've tried creating a line using other controls with a 3D
> border - which is one option.
[quoted text clipped - 18 lines]
> >
> > Thanks in advance.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.