public static void Apply(Control ctrl, int _Elipse) { try { ctrl.Region = Region.FromHrgn(Elipse.CreateRoundRectRgn(0, 0, ctrl.Width, ctrl.Height, _Elipse, _Elipse)); } catch (Exception) { MessageBox.Show("Lỗi xử lí giao diện Elipse cho Control"); } }
public static void Apply(Form Form, int _Elipse) { try { Form.FormBorderStyle = FormBorderStyle.None; Form.Region = Region.FromHrgn(Elipse.CreateRoundRectRgn(0, 0, Form.Width, Form.Height, _Elipse, _Elipse)); } catch (Exception) { MessageBox.Show("Lỗi xử lí giao diện Elipse cho Form"); } }