giodamelio
giodamelio

Reputation: 5605

Winforms border style

I am trying to make a form with a border like the border on the Windows Vista volume control. The form would need to be resizeable as well.

enter image description here

Thanks, giodamelio

To be a little more clear about what I am looking for. Here is a form with the ControlBox property set to false.

enter image description here

Here is a rough Photoshop of what I am looking for.

enter image description here

Upvotes: 1

Views: 2397

Answers (4)

Stefan
Stefan

Reputation: 11519

Set the forms .Controlbox=False
Set the forms .Text=""

Done.

Upvotes: 2

Javed Akram
Javed Akram

Reputation: 15354

One way achieve this by following steps:

  • Set FormBorderStyle of your Form to None.

  • Take a PictureBox, set its Dock Property to Fill.

  • Take a image containing Border, and set this Image to the PictureBox.

Upvotes: 0

Konrad Rudolph
Konrad Rudolph

Reputation: 546073

Try setting the FormBorderStyle to None or Fixed(3D|Single) and work from there, perhaps.

Alternatively, setting the ControlBox to False should also have the effect of hiding the title bar. However, beware that the form won’t update automatically:

If you set ControlBox to false, and also set the Location property, the Size property of Form will not update to reflect that the non-client area of the form has been hidden. To fix this problem, put the code which alters the Location property to the HandleCreated event.

Upvotes: 0

SwissGuy
SwissGuy

Reputation: 565

You can enable in your Projectsettigs "enable XP-Visual Style". If you launch your application now, you should have the default borderstyle of the launched OS

Upvotes: 0

Related Questions