469,588 Members | 2,783 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,588 developers. It's quick & easy.

Divider Line like VS.NET about box


Is there a divider control in VB.NET similar to a Horizontal Line in HTML?
In the About Box of VS.NET, there is a divider line at the bottom of the
page.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #1
3 8186
Hi, No there isn't, but do not despair!! I suggest doing the following:

(Assuming what you are talking about is the 2 pixel indented (or etched)
line)

1. Create a panel... make it at least 2px in height and place it where you
want the line. If you make it larger than 2px, for easy placement, the line
will be drawn at the bottom of the control. But it will *always* be drawn as
2px.

2. Open up the code editor and make sure you are meddling with the Paint
event of the Panel.

3. Enter the following code:

ControlPaint.DrawBorder3D(e.Graphics, DirectCast(sender, Panel),
Border3DStyle.Etched, Border3DSide.Bottom)

If you want more lines, then edit the handles clause after your painting
subroutine to include the panel's you also want to paint the line on.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Chaos, Panic, Disorder, my work here is done"
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
:
: Is there a divider control in VB.NET similar to a Horizontal Line in HTML?
: In the About Box of VS.NET, there is a divider line at the bottom of the
: page.
: --
: Lucas Tam (RE********@rogers.com)
: Please delete "REMOVE" from the e-mail address when replying.
: http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #2
Hello,

"Lucas Tam" <RE********@rogers.com> schrieb:
Is there a divider control in VB.NET similar to a Horizontal
Line in HTML?


Add a label control, set its height to 2 pixels and set its 'BorderStyle'
property to 'Fixed3D'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in
news:uB*************@tk2msftngp13.phx.gbl:
Hello,

"Lucas Tam" <RE********@rogers.com> schrieb:
Is there a divider control in VB.NET similar to a Horizontal
Line in HTML?


Add a label control, set its height to 2 pixels and set its 'BorderStyle'
property to 'Fixed3D'.


This worked perfectly! Thanks!

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Tarren | last post: by
2 posts views Thread by Jim Lewis | last post: by
9 posts views Thread by Adi | last post: by
11 posts views Thread by xdevel | last post: by
19 posts views Thread by =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post: by
8 posts views Thread by Lord Zoltar | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.