Divider Line like VS.NET about box

  • Thread starter Thread starter Lucas Tam
  • Start date Start date
L

Lucas Tam

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.
 
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"


:
: 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 ([email protected])
: Please delete "REMOVE" from the e-mail address when replying.
: http://members.ebay.com/aboutme/coolspot18/
 
Hello,

Lucas Tam said:
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'.
 
Back
Top