C#窗体中的圆angular

我有一个无国界的窗口。 我searchnetworking的圆angular,但都与边界。 我怎样才能使窗体的圆angular(not with borders) ? 有没有办法做到这一点?

我是C#的新手,所以请解释…

谢谢

尝试这个:

 using System; using System.Windows.Forms; using System.Runtime.InteropServices; namespace WindowsFormsApplication1 { public partial class Form1 : Form { [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] private static extern IntPtr CreateRoundRectRgn ( int nLeftRect, // x-coordinate of upper-left corner int nTopRect, // y-coordinate of upper-left corner int nRightRect, // x-coordinate of lower-right corner int nBottomRect, // y-coordinate of lower-right corner int nWidthEllipse, // height of ellipse int nHeightEllipse // width of ellipse ); public Form1() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20)); } } } 

从这里: 在C#中的圆形边界的形式?

该地区的主权只是切断了角落。 要有一个真正的圆角,你将不得不绘制圆角的矩形。

绘制圆角的矩形

画一个你想要的形状的图像可能会更容易,并把它放在透明的窗体上。 更容易绘制,但不能调整大小。

另外检查这另一个

我发现这个代码

要想出圆角的文本框,我开始尝试使用paint override事件,但不幸的是没有任何结果,这是由于事实(我认为)文本框是从Windows派生的。 因此,我尝试覆盖WM_PAINT API,而不是有预期的结果

http://www.codeproject.com/Articles/17453/Textbox-with-rounded-corners

谢谢