473,320 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

What control is this?

Max
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.
Nov 20 '05 #1
19 1330
In article <Mp********************@comcast.com>, ma*****@yahoo.com
says...
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.


It is a GroupBox. The "Size" property contains both Width and Height.
Setting the Height to 4 gives the appearance your showed in your image.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #2
I've done the groupbox thing before too and didn't like the results. I've
toyed before with drawing it myself with GDI (seemed like overkill). I
awaiting to here what others would do.

Greg

"Max" <ma*****@yahoo.com> wrote in message
news:Mp********************@comcast.com...
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.

Nov 20 '05 #3
Max
Patrick Steele [MVP] wrote:
In article <Mp********************@comcast.com>, ma*****@yahoo.com
says...
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.

It is a GroupBox. The "Size" property contains both Width and Height.
Setting the Height to 4 gives the appearance your showed in your image.


Doesn't seem to work for me, here's what I get:
http://www.subdir.net/myFiles/line_ss2.jpg

You see a little piece on the right that starts going down. That side
always looks like that no matter what height I set (4,3,2, etc...).
Nov 20 '05 #4
I just tried with height 4 and it has just the hint of a vertical line still
on the far right. :(

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <Mp********************@comcast.com>, ma*****@yahoo.com
says...
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.


It is a GroupBox. The "Size" property contains both Width and Height.
Setting the Height to 4 gives the appearance your showed in your image.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Nov 20 '05 #5
* Max <ma*****@yahoo.com> scripsit:
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the
form. Does anybody know how to make those same lines in VB .NET? Look
all over but can't find anything that looks like it, the only thing
that comes close is a group box that only has a width but no height,
but that doesn't look too good around the edges. Please let me know if
you have an idea on how to make this.


Have a look at this discussion (complete thread):

<URL:http://www.google.de/groups?threadm=eV5alMTMEHA.624%40TK2MSFTNGP11.phx. gbl>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
* "Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> scripsit:
I've done the groupbox thing before too and didn't like the results. I've
toyed before with drawing it myself with GDI (seemed like overkill). I
awaiting to here what others would do.


I posted a link to a discussion containing some suggestions as a reply
to the OP.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #7
Hi Greg,

If you look at the properties dialog box for a file in a program such as
explorer there is a vertical line on the far right on these also. If this
really annoys you, then you could draw the lines in the Paint event. The
colors for the two lines, I believe are
System.Drawing.SystemColors.ControlLightLight and
System.Drawing.SystemColors.ControlDarkDark (I might be wrong on that, but
play around a little and you'll get it).

Usually when I want to draw a dip, I do just this, draw two lines in the
Paint event. You can use the Frame/Group control as others have suggested
though. It's up to you.

Thanks,

Andrew

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uD*************@TK2MSFTNGP12.phx.gbl...
I just tried with height 4 and it has just the hint of a vertical line still on the far right. :(

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <Mp********************@comcast.com>, ma*****@yahoo.com
says...
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form. Does anybody know how to make those same lines in VB .NET? Look all over but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.


It is a GroupBox. The "Size" property contains both Width and Height.
Setting the Height to 4 gives the appearance your showed in your image.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele


Nov 20 '05 #8
In article <Zo********************@comcast.com>, ma*****@yahoo.com
says...
Doesn't seem to work for me, here's what I get:
http://www.subdir.net/myFiles/line_ss2.jpg

You see a little piece on the right that starts going down. That side
always looks like that no matter what height I set (4,3,2, etc...).


Oh yeah -- didn't notice that (old eyes)... Check out Herfried's reply.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #9
Thanks, the label control idea worked wonders.

Greg

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2k************@uni-berlin.de...
* "Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> scripsit:
I've done the groupbox thing before too and didn't like the results. I've toyed before with drawing it myself with GDI (seemed like overkill). I
awaiting to here what others would do.


I posted a link to a discussion containing some suggestions as a reply
to the OP.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #10
> If you look at the properties dialog box for a file in a program such as
explorer there is a vertical line on the far right on these also.


Curious. What OS are you seeing that with? My XP Pro doesn't have it.

Greg
Nov 20 '05 #11
Hi Greg,

I too have XP Pro and rest assured it is there. It is also there in other
OS's such as Win 98. I've been using such lines in my programming for years.
You can use the Magnifier under Accessories to inspect it.

There is *NO* control in VB6 or VB .NET that can mimic this except the
GroupBox/Frame control. I tried one right now, just to ensure my sanity, and
it works.

Like I said, your other alternative is the Paint event (which would most
like use less resources). Of course, you could make your own control if this
really bothering you.

If you do use a GroupBox control, ensure that you clear the Text property
and set the height to 2 pixels.

Andrew

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uz****************@tk2msftngp13.phx.gbl...
If you look at the properties dialog box for a file in a program such as
explorer there is a vertical line on the far right on these also.


Curious. What OS are you seeing that with? My XP Pro doesn't have it.

Greg

Nov 20 '05 #12
Max
Herfried K. Wagner [MVP] wrote:
* Max <ma*****@yahoo.com> scripsit:
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the
form. Does anybody know how to make those same lines in VB .NET? Look
all over but can't find anything that looks like it, the only thing
that comes close is a group box that only has a width but no height,
but that doesn't look too good around the edges. Please let me know if
you have an idea on how to make this.

Have a look at this discussion (complete thread):

<URL:http://www.google.de/groups?threadm=eV5alMTMEHA.624%40TK2MSFTNGP11.phx. gbl>


Big thanks for that. For everyone else trying to make this work, take a
look here: http://www.codeproject.com/cs/miscctrl/hvrules1.asp

Download the .dll file from there, add it to your resources, and then
you use Covidimus.Forms.HorizRule to add a line like that. Since it
doesn't show up on the actual controls you'll have to add it manually to
the form in the Windows Form Designer generated code region, but after
it shows up for the first time you can just copy and paste it for more
instances.

A bit more work then I would like, but hey, it works:
http://www.subdir.net/myFiles/line_ss3.jpg
Nov 20 '05 #13
Max
Andrew McKendrick wrote:
Hi Greg,

I too have XP Pro and rest assured it is there. It is also there in other
OS's such as Win 98. I've been using such lines in my programming for years.
You can use the Magnifier under Accessories to inspect it.

There is *NO* control in VB6 or VB .NET that can mimic this except the
GroupBox/Frame control. I tried one right now, just to ensure my sanity, and
it works.

Like I said, your other alternative is the Paint event (which would most
like use less resources). Of course, you could make your own control if this
really bothering you.

If you do use a GroupBox control, ensure that you clear the Text property
and set the height to 2 pixels.

Andrew

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uz****************@tk2msftngp13.phx.gbl...
If you look at the properties dialog box for a file in a program such as
explorer there is a vertical line on the far right on these also.


Curious. What OS are you seeing that with? My XP Pro doesn't have it.

Greg



Don't have the line on mine either, I don't have the Magnifier
installed, but even if I take a screenshot and zoom in on that there is
nothing there, just a straight line.

Now as for actually making this work, see my reply to Herfried K.
Wagner. The article here:
http://www.codeproject.com/cs/miscctrl/hvrules1.asp makes this all
happen very nicely.
Nov 20 '05 #14
Did you try the label set to Fixed 3d Width, no text, and height 3px? Taste
great, less filling.
A bit more work then I would like, but hey, it works:
http://www.subdir.net/myFiles/line_ss3.jpg

Nov 20 '05 #15
Hi Greg,

It's hardly an artifact of compression... Microsoft actually meant it to
look like this.

The dip (as it's called) is formed by two horizontal lines on top of each
other with a vertical line appearing on the right. The upper line is a
darker color and the lower line and vertical is a lighter color. Usually
dark gray and white if you're using the Standard Windows color
configuration.

If you found a solution that works for you, good. Nuff said about a line.

Andrew
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:OB**************@TK2MSFTNGP12.phx.gbl...
?

Are we talking about the same vertial line? The one here:
http://www.subdir.net/myFiles/line_ss2.jpg
is what I see in VB.NET. I don't see that in windows explorer or your
graphic. I see a slight articfact from the compression of the jpeg (at
least I assume that is what that is, hard to say)

I've attached my own screenshot from explorer which looks fine (even with
magnifier)...

"There is *NO* control in VB6 or VB .NET that can mimic this except the
GroupBox/Frame control. I tried one right now, just to ensure my sanity, and it works."

I just tried the GroupBox too, and it did the vertical line like Max
screenshot shows.

Herfried's label control idea works like a charm, try it out!

Greg

"Andrew McKendrick" <andréwém@cogéco.ca> wrote in message
news:Om**************@TK2MSFTNGP12.phx.gbl...
A picture is worth a thousand words...

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uz****************@tk2msftngp13.phx.gbl...
> If you look at the properties dialog box for a file in a program
such
as > explorer there is a vertical line on the far right on these also.

Curious. What OS are you seeing that with? My XP Pro doesn't have it.

Greg



Nov 20 '05 #16
Max
Greg Burns wrote:
Did you try the label set to Fixed 3d Width, no text, and height 3px? Taste
great, less filling.

A bit more work then I would like, but hey, it works:
http://www.subdir.net/myFiles/line_ss3.jpg



Yea that also works, but the height has to be 2px :)
Nov 20 '05 #17
even better

"Max" <ma*****@yahoo.com> wrote in message
news:dK********************@comcast.com...
Greg Burns wrote:
Did you try the label set to Fixed 3d Width, no text, and height 3px? Taste great, less filling.

A bit more work then I would like, but hey, it works:
http://www.subdir.net/myFiles/line_ss3.jpg



Yea that also works, but the height has to be 2px :)

Nov 20 '05 #18

"Max" <ma*****@yahoo.com> wrote in message
news:Mp********************@comcast.com...
Take a look at this screenshot that I've made:
http://www.subdir.net/myFiles/line_ss.jpg

I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.


For reference, I use a 2-pixel-high Label with border set to 3D. I've only
looked at it under the XP Windows Classic theme (no Fisher-Price buttons for
me!) so I can't say if it works with the standard theme.
Nov 20 '05 #19
Jeff,

* "Jeff Johnson [MVP: VB]" <i.***@enough.spam> scripsit:
I've circled the two lines that separate different sections of the form.
Does anybody know how to make those same lines in VB .NET? Look all over
but can't find anything that looks like it, the only thing that comes
close is a group box that only has a width but no height, but that
doesn't look too good around the edges. Please let me know if you have
an idea on how to make this.


For reference, I use a 2-pixel-high Label with border set to 3D. I've only
looked at it under the XP Windows Classic theme (no Fisher-Price buttons for
me!) so I can't say if it works with the standard theme.


It looks the same even with Windows XP Visual Styles turned on.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Armando | last post by:
Hey again - I have a bunch of similar controls on a form (A2000), and I'm calling the same code (with an argument as to what was clicked) when any one of them is clicked. I'd like to generalize...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
0
by: Merkisson Jourhanssen | last post by:
I will be using LoadControl to add user control to aspx page at runtime. The user control hosts a server control (custom menu component) which requires property setting to display menu correctly: ...
9
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see)...
8
by: Ravi Ambros Wallau | last post by:
Hey guys: What can I do when an "Error Creating Control" is displayed on the form (instead of the control), and a tooltip indicating the error never is displayed? Is there some log, some hidden...
9
by: Jay | last post by:
Everywhere I go (read/browse) I see these parameters.... ByVal sender As Object, ByVal e As System.EventArgs Yet I never see them used within the function/method. Could someone tell me what they...
7
by: ÀÏÆÅ»³ÔÐ5¸öÔ | last post by:
I want use dropdownlist contral in gridview but have trouble now mycode here: i'm very sorry for my poor english <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"...
17
by: Alan Silver | last post by:
Hello, I have a page which I am converting to use themes. The page has an HTML <input type="image"> element that is used to post to another page. I would like to replace this with a server...
0
by: John Smith | last post by:
I still have not gotten this damn thing figured out and I'm asking for help one last time before I give up on it. I have a user control that contains a paged gridview control. The master page...
3
by: Frank Rizzo | last post by:
In the WinForms context.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.