Réponse acceptée !
Salut, on peut jouer aussi avec la région du contrôle :
public Form1( )
{
InitializeComponent( );
Image img = Image.FromFile( @"C:\Users\Mike\Pictures\img.jpg" );
GraphicsPath gp = GetRoundRect( 0.0f, 0.0f, 200.0f, 200.0f, 10.0f );
PictureBox pb = new PictureBox( );
pb.Parent = this;
pb.Image = img;
pb.Location = new Point( 20, 20 );
pb.Size = new Size( 200, 200 );
pb.Region = new Region( gp );
}
//
[ Lien ]
public GraphicsPath GetRoundRect( float X, float Y, float width, float height, float radius)
{
GraphicsPath gp = new GraphicsPath( );
gp.AddLine(X + radius, Y, X + width - (radius*2), Y);
gp.AddArc(X + width - (radius*2), Y, radius*2, radius*2, 270, 90);
gp.AddLine(X + width, Y + radius, X + width, Y + height - (radius*2));
gp.AddArc(X + width - (radius*2), Y + height - (radius*2), radius*2, radius*2,0,90);
gp.AddLine(X + width - (radius*2), Y + height, X + radius, Y + height);
gp.AddArc(X, Y + height - (radius*2), radius*2, radius*2, 90, 90);
gp.AddLine(X, Y + height - (radius*2), X, Y + radius);
gp.AddArc(X, Y, radius*2, radius*2, 180, 90);
gp.CloseFigure();
return gp;
}