Advertisement
Yassine_Abbani

circular [button], [Costume Control]

May 11th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. #region Import
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Drawing.Drawing2D;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows.Forms;
  9. #endregion
  10.  
  11. #region Copyright
  12. //Creator: Yassine Abbani
  13. #endregion
  14. // Type your Own namespace
  15. namespace RoundButtonDemo*
  16.  
  17. #region circular button
  18. {
  19.     class Ce_CircularButton : Button
  20.     {
  21.         protected override void OnPaint(PaintEventArgs pevent)
  22.         {
  23.             GraphicsPath grPath = new GraphicsPath();
  24.             grPath.AddEllipse(0, 0, ClientSize.Width, ClientSize.Height);
  25.             this.Region = new System.Drawing.Region(grPath);
  26.             base.OnPaint(pevent);
  27.         }
  28.     }
  29. }
  30. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement