using System.Runtime.InteropServices;
[DllImportAttribute ("gdi32.dll")]
public static extern IntPtr CreateRoundRectRgn(int nLeftRect,int nTopRect,int nRightRect,int nBottomRect,int nWidthEllipse,int nHeightEllipse);
[DllImportAttribute ("user32.dll")]
public static extern int SetWindowRgn(IntPtr hWnd,IntPtr hRgn, bool bRedraw);
Fom1 fl = new Form1();
IntPtr regionHandle =CreateRoundRectRgn(0,0,fl.Width,fl.Height,20,20);
Region roundRegion = null;
roundRegion = Region.FromHrgn(regionHandle);
SetWindowRgn(Handle,regionHandle,true);