Salut...
Je veux faire apparaittre plusieurs cercle (à partir d'un Tableau) dans un PictureBox.
Le code ci-dessous affiche qu'un seul cercle.
Comment est-il possible de coder afin de ne pas effacer le cercle et d'en mettre un nouveau...
J'ai fais plein de test mais je n'y arrive pas...
Meri d'avance
P.S. je suis en compact framwork mais j'ai besoin de vos idées...
Private
Sub
BtnCercle_Click(
ByVal
sender
As
System.Object,
ByVal
e
As
System.EventArgs)
Handles
cmdDessin.Click
Dim
objBitMap
As
New
Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim
objGraphics
As
Graphics
Dim
MonRectable
As
Rectangle
Dim
MaBrush
As
Brush
Dim
i
As
Integer
Dim
CoordX
As
Double
, CoordY
As
Double
For
i = 0
To
UBound(Tableau)
LigneSplit = Tableau(i).Split(Separateur)
CoordX = ((Convert.ToDouble(LigneSplit(2)) + 5000) / 1000)
CoordY = ((Convert.ToDouble(LigneSplit(1)) + 5000) / 1000)
objGraphics = Graphics.FromImage(objBitMap)
MonRectable =
New
Rectangle(CoordX, CoordY, 5, 5)
MaBrush =
New
SolidBrush(Color.Blue)
objGraphics.Clear(Color.White)
objGraphics.FillEllipse(MaBrush, MonRectable)
Me
.PictureBox1.Image = objBitMap
objGraphics.Dispose()
objGraphics =
Nothing
Next
i
End
Sub