I would like to remove form frame in c#
Picture: http://img251.imageshack.us/img251/9114/87017773.jpg
Anyone know how can I do this ?
I would like to remove form frame in c#
Picture: http://img251.imageshack.us/img251/9114/87017773.jpg
Anyone know how can I do this ?
In WinForms you can set the FormBorderStyle
property on the form to None
.
Try Window.WindowStyle = WindowStyle.None
if you're using WPF.
(I've added this as a second answer to make it clearer that Wallace actually got the right answer first. I had a couple of failed attempts!)
Set the FormBorderStyle
property to None
. Sample code:
using System;
using System.Windows.Forms;
public class Test
{
[STAThread]
static void Main()
{
Button button = new Button { Text = "Click to close" };
Form form = new Form
{
Controls = { button },
FormBorderStyle = FormBorderStyle.None,
};
button.Click += delegate { form.Close(); };
Application.Run(form);
}
}