-
im using bitblt to draw some tiles on a picture box and whenever i put another form (or alt-tab out then back) in front of the picture box and then remove it, the tiles are gone leaving just the boring grey background. Is there anyway to detect whenever this happens and redraw the tiles?
-
hi,
Set the AutoReDraw Property to TRUE for the picture box control..
kandan
-
no, that just gives me the grey background all the time, what i need is an autobitblt function
-
What Kandan suggests is correct, but you also need to make sure you set the Picture Property to the Image Property after performing your Tiling operation, eg.
Code:
'Make the Image a Persistent Graphic
Picture1.AutoRedraw = True
Picture1 = Picture1.Image
Alternatively you can place your Tiling Code in the Picturebox's Paint Event,
This will trigger every time the Picturebox is Repainted,
Like when a Form is displayed over it then removed.
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]