essai ca... il te suffit de rnommer le panel p06 et je crois que c'est tout..
si ca marche pas me redire et creer un button1
le code pourrait etre amelioré, c'est sur...
a plus
Public Class GraphicTest
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Application.Exit()
End Sub
Dim m_Graphics As Graphics
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
m_Graphics = Me.P06.CreateGraphics
End Sub
Private Sub Graphisme_Shown(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Shown
maMethode(m_Graphics)
End Sub
Sub maMethode(ByVal MonGraphics As Object)
Dim r As Rectangle
r = New Rectangle(0, 0, 15, 20)
MonGraphics.FillRectangle(New SolidBrush(Color.Black), r)
r = New Rectangle(15, 0, 30, 20)
MonGraphics.fillRectangle(New SolidBrush(Color.Black), r)
End Sub
End Class