Home All Groups Group Topic Archive Search About

Lines and Boxes in VB.Net

Author
11 Apr 2005 6:22 AM
bdtmike
Ok, dumb question from a newbie who does most of his development in
MSACCESS:

Access has a line control and a box control for placing lines on my
form.  How is this accomplished in VB.Net?  Hopefully we're not back to
using pixel coordinates and a draw method!

-Mike

Author
11 Apr 2005 7:02 AM
Cor Ligthert
Mike,

One of the things that are missing is the posibility to draw a line on a
form in Net. In my opinion is the most efficient to use a very small control
that has lines

Copied from a message from Herfried, I don't know if it is original his.

You can use a label control with width or height set to 2, and
'BorderStyle' set to 'Fixed3D' to create an inset line.

I hope this helps,

Cor
Author
11 Apr 2005 9:34 AM
Herfried K. Wagner [MVP]
<bdtm***@hotmail.com> schrieb:
> Access has a line control and a box control for placing lines on my
> form.  How is this accomplished in VB.Net?  Hopefully we're not back to
> using pixel coordinates and a draw method!

Shapes and lines:

Advanced Shape Control
<URL:http://www.codeproject.com/vb/net/advanced_shape_control.asp>

LineControls.exe
<URL:http://www.gotdotnet.com/team/vb/LineControls.exe>
<URL:http://download.microsoft.com/download/7/e/0/7e070297-47fe-4443-9194-ab57acd8ea01/LineControls.msi>

Creating transparent Windows Forms controls.
<URL:http://www.bobpowell.net/transcontrols.htm>

Rules:

Wrapping Win32 Controls in .NET - Horizontal and Vertical Rules
<URL:http://www.codeproject.com/cs/miscctrl/hvrules1.asp>

Alternatively you can use a label control with width or height set to 2, and
'BorderStyle' set to 'Fixed3D' to create an inset line.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Apr 2005 12:28 AM
bdtmike
Thanks.  This is very helpful.  At least there's a workaround for
everything.  It looks like they left a lot of stuff out but I guess
that's what Whitbey is for...
Author
12 Apr 2005 8:58 AM
Herfried K. Wagner [MVP]
<bdtm***@hotmail.com> schrieb:
> Thanks.  This is very helpful.  At least there's a workaround for
> everything.  It looks like they left a lot of stuff out but I guess
> that's what Whitbey is for...

Whidbey won't include shape controls :-(.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
14 Apr 2005 3:13 AM
bdtmike
That's amazing..  There are shapes on just about every  dialog box you
dessign.  Why leave that one out?
Author
14 Apr 2005 11:19 AM
Herfried K. Wagner [MVP]
<bdtm***@hotmail.com> schrieb:
> That's amazing..  There are shapes on just about every  dialog box you
> dessign.  Why leave that one out?

Only Microsoft knows...

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>