He everyone!

I'm using this function to draw images on my pictureBox
VB Code:
  1. Dim gr As Graphics = pctBox.CreateGraphics
  2. gr.DrawImage(New Bitmap("c:\pion.gif"), iX, iY)

As you know when you minimize your application all those things you drew on it are gone so I searched for the GotFocus or something and found/created this:
VB Code:
  1. Public Sub frmMain_Activated(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Activated
  2.         Dim iLoop, iX, iY As Integer
  3.  
  4.         For iLoop = 0 To 29
  5.             iX = Coordinate2Pixel(pioPion(iLoop).GetCoordinateX())
  6.             iY = Coordinate2Pixel(pioPion(iLoop).GetCoordinateY())
  7.  
  8.             Dim gr As Graphics = pctBox.CreateGraphics
  9.             gr.DrawImage(New Bitmap("c:\pion.gif"), iX, iY)
  10.         Next
  11. End Sub
To draw them back whenever my app lost focus... Now does this work when I popup an messagebox... but not when I minimize & maximize my application anyone with good ideas?!

Thnx in advance,

Bloged