Bonjour,

Je me bute à un problème d'ajouter une ligne par dessus un PictureBox ... et je ne trouve pas cette info. J'ai beau faire un SendToback() de mon PictureBox ... rien a faire, ma ligne s'affiche derrière :-(

La je m'incline ...

Pour info je suis avec VS 2008 express.
====================================================================
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
PictureBox  pb = new PictureBox();
pb.BorderStyle = BorderStyle.FixedSingle;
pb.Size = new Size(100,10);
pb.Left = 50;
pb.Top = 200;
pb.SendToBack();
this.Controls.Add(pb);
 
System.Drawing.Pen myPen = new System.Drawing.Pen(Color.FromArgb(128, 255, 0, 0));
System.Drawing.Graphics formGraphics = this.CreateGraphics();
formGraphics.DrawLine(myPen, 60, 200, 60, 220);