public static void RoundBorderForm(Form frm)
{
Rectangle Bounds = new Rectangle(0, 0, frm.Width, frm.Height);
int CornerRadius = 20;
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
path.AddArc(Bounds.X, Bounds.Y, CornerRadius, CornerRadius, 180, 90);
path.AddArc(Bounds.X + Bounds.Width - CornerRadius, Bounds.Y, CornerRadius, CornerRadius, 270, 90);
path.AddArc(Bounds.X + Bounds.Width - CornerRadius, Bounds.Y + Bounds.Height - CornerRadius, CornerRadius, CornerRadius, 0, 90);
path.AddArc(Bounds.X, Bounds.Y + Bounds.Height - CornerRadius, CornerRadius, CornerRadius, 90, 90);
path.CloseAllFigures();
frm.Region = new Region(path);
frm.Show();
}
स्रोत
2015-07-05 09:34:15
इस प्रश्न का उत्तर सहायक हो सकता है: http://stackoverflow.com/questions/5092216/c-sharp-form-with-custom-border-and-rounded-edges –
यह शानदार लग रहा है, लेकिन उम। ..मैं नया हूं इसलिए ... मुझे नहीं पता कि यह सब सामान कहां रखा जाए। मुझे पता है कि कोड() चीज़ के तहत कोड कहां रखना है, लेकिन दूसरा मुश्किल है। क्या आप मेरी मदद कर सकते हैं? –