/// <summary> /// Applies the specified control. /// </summary> /// <param name="ctrl">The control.</param> /// <param name="Elipse">The elipse.</param> public static void Apply(Control ctrl, int Elipse) { try { ctrl.Region = Region.FromHrgn(ZeroitSupremeCircleElipseControlsWithForm.CreateRoundRectRgn(0, 0, ctrl.Width, ctrl.Height, Elipse, Elipse)); } catch (Exception exception) { ProjectData.SetProjectError(exception); ProjectData.ClearProjectError(); } }
/// <summary> /// Applies the specified form. /// </summary> /// <param name="Form">The form.</param> /// <param name="_Elipse">The elipse.</param> public static void Apply(System.Windows.Forms.Form Form, int _Elipse) { try { Form.FormBorderStyle = FormBorderStyle.None; Form.Region = Region.FromHrgn(ZeroitSupremeCircleElipseControlsWithForm.CreateRoundRectRgn(0, 0, Form.Width, Form.Height, _Elipse, _Elipse)); } catch (Exception exception) { ProjectData.SetProjectError(exception); ProjectData.ClearProjectError(); } }
/// <summary> /// Method4s the specified sender. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void Method4(object sender, EventArgs e) { ZeroitSupremeCircleElipseControlsWithForm.Apply(this.LblPass, this.LblPass.Height); this.LblPass.Top = checked ((int)System.Math.Round((double)base.Height / 2 - (double)this.LblPass.Height / 2)); this.LblPass.Left = checked ((int)System.Math.Round((double)base.Width / 2 - (double)this.LblPass.Width / 2)); }