1 Attachment(s)
How to create a small line in GUI?
Hi, I am working on an assignment for my VB.Net class, and our instructor presented us with a screenshot of what the form we have created should look like when finished. The exercise is geared more toward creating group boxes, learning layout and controls...those sorts of things, and I think I've added everything, EXCEPT...the screenshot shows a small black line in between the group boxes and a label with some text in it. I just can't figure out how to create this thin line. I suppose it could be an image, but I'm not sure. Can anyone help me out? I've attached a doc with the image so that you can see what I'm talking about. Thanks for any and all help! Geaux noobs!
:afrog:
Re: How to create a small line in GUI?
Could that be a screenshot from a VB6 program that the instructor used before the course for VB.NET was created? VB6 had a line control, but .NET does not. If you really want a line you can do it with a single line of code.
Re: How to create a small line in GUI?
Re: How to create a small line in GUI?
The easiest way is to handle the Paint event and write e.Graphics.DrawLine(0, 150, Me.Size.Width, 150), replacing 150 with whatever height you need.
Re: How to create a small line in GUI?
That looks like a VB 6 Form. If your using VB 6 then you can use the line control. If your using VB.NET then either use GDI+ like already posted or easier, use a label with a black background with a height of 1 pixel. :D
Re: How to create a small line in GUI?
Make a label with borderstyle set to either 3D or single, and make the height of the label 2 pixels and the width to match the width of the form.
EDIT: damn you Rob.... :p
Re: How to create a small line in GUI?
Thanks very much, everyone!