Bonjour,
Je veux créer un MessageBox perso en affichant les icônes standard de la messageBox windows (point d'exclamation,...)
Les icônes standard se trouve apparemment dans System.Drawing.SystemIcons.
J'ai fait l'exemple décrit dans Msdn (code ci-dessous) et au final j'ai juste un carré avec un trait bleu mais pas d'icône.
Quelqu'un à une idée ???
private void Button2_Click(System.Object sender, System.EventArgs e)
{
Bitmap bitmap1 = Bitmap.FromHicon(SystemIcons.Hand.Handle);
Graphics formGraphics = this.CreateGraphics();
GraphicsUnit units = GraphicsUnit.Point;
RectangleF bmpRectangleF = bitmap1.GetBounds(ref units);
Rectangle bmpRectangle = Rectangle.Round(bmpRectangleF);
formGraphics.DrawRectangle(Pens.Blue, bmpRectangle);
formGraphics.Dispose();
}
Merci
Partager