Click here to Skip to main content
15,668,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to set custom border size in win form app.?

like in many metro forms this property is given.

There is not such thing in System.Windows.Forms, there are only few predefined border types. If you really need it, you can, for example, create a window free from non-client areas and simulate border in the client area.

Share this answer
you can subscribe for Form.Paint event and use this code to do that.

private void Form1_Paint(object sender, PaintEventArgs e)
   e.Graphics.DrawRectangle(new Pen(Color.GREEN, 3),
Share this answer
Try this :

Form1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;

Reference :

Changing the Borders of Windows Forms[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900