Пример #1
0
 private void control_Resize(object sender, EventArgs e)
 {
     Elipse.Apply(this.control, this.size);
     if (this.eventHandler != null)
     {
         this.eventHandler(sender, e);
     }
 }
Пример #2
0
 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");
     }
 }
Пример #3
0
 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");
     }
 }
Пример #4
0
 public void ApplyElipse()
 {
     try
     {
         if (this.control != null)
         {
             Elipse.Apply(this.control, this.size);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Lỗi sủ lý FormEclipse");
     }
 }