How to make perfect rounded corner shape in Windows Form using C#

  • Thread starter Thread starter Gani tpt
  • Start date Start date
G

Gani tpt

Guest
I want to design perfect rounded corner shape in Windows Form using C#.

i tried the shape using below code. But, i am not getting the clear resolution in the 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, // width of ellipse
int nHeightEllipse // height of ellipse
);
public frmMain()
{
InitializeComponent();
this.FormBorderStyle = FormBorderStyle.None;
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 25, 30));

}


pls. find attached screenshot for reference.1551101.png

pls. give more suggestion to make perfect rounded corner using win form c#

Continue reading...
 
Back
Top