PDA

View Full Version : شکل فرمم را به این چه جوری!!!!!!!!!!!!!!!



mazaher5723
سه شنبه 23 خرداد 1391, 21:48 عصر
سلام دوستان
می خوام چهار گوشش کمان بشه مثل عکس ضمیمه ؟؟؟؟؟؟؟؟
باید چکار کنم؟؟؟؟؟؟

r0ot$harp
سه شنبه 23 خرداد 1391, 22:17 عصر
از کد زیر استفاده کنید:

[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 FormName()
{
InitializeComponent();
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn( 0, 0, Width + 1, Height + 1, 20, 20)); // adjust these parameters to get the look
}


باتشکر احسان