Tutoriel [CODE] BOUTON ROND EN C #

⋆Ҭђ૯ ᗠЄ∨∫Ŀ꒚⋆

Fond₳teur
Insσmηi'Hλck™
Fond₳teur
30/4/17
674
416
3353
29
66
youtu.be
#1
Ajouter en tant que ressource:

Code:

Système d'utilisation;
En utilisant System.Collections.Generic;
En utilisant System.Drawing.Drawing2D;
En utilisant System.Windows.Forms;
En utilisant System.Linq;
En utilisant System.Text;

Code:
Classe publique RoundButton: bouton
{
Protected override void OnPaint (System.Windows.Forms.PaintEventArgs e)
{
GraphicsPath grPath = new GraphicsPath ();
GrPath.AddEllipse (0, 0, ClientSize.Width, ClientSize.Height);
This.Region = new System.Drawing.Region (grPath);
Base.OnPaint (e);
}
}

La source:
Code:

Système d'utilisation;
En utilisant System.Collections.Generic;
En utilisant System.Drawing.Drawing2D;
En utilisant System.Windows.Forms;
En utilisant System.Linq;
En utilisant System.Text;

Espace de noms WindowsFormsApplication1
{
Classe publique RoundButton: bouton
{
Protected override void OnPaint (System.Windows.Forms.PaintEventArgs e)
{
GraphicsPath grPath = new GraphicsPath ();
GrPath.AddEllipse (0, 0, ClientSize.Width, ClientSize.Height);
This.Region = new System.Drawing.Region (grPath);
Base.OnPaint (e);
}
}

}
 
J'aime: zhacken