He everyone!
I'm using this function to draw images on my pictureBox
VB Code:
Dim gr As Graphics = pctBox.CreateGraphics 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:
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?!VB Code:
Public Sub frmMain_Activated(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Activated Dim iLoop, iX, iY As Integer For iLoop = 0 To 29 iX = Coordinate2Pixel(pioPion(iLoop).GetCoordinateX()) iY = Coordinate2Pixel(pioPion(iLoop).GetCoordinateY()) Dim gr As Graphics = pctBox.CreateGraphics gr.DrawImage(New Bitmap("c:\pion.gif"), iX, iY) Next End Sub
Thnx in advance,
Bloged





Reply With Quote