PDA

Click to See Complete Forum and Search --> : bitblt


dvadas
Nov 17th, 1999, 09:56 AM
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?

kandan
Nov 17th, 1999, 12:01 PM
hi,

Set the AutoReDraw Property to TRUE for the picture box control..

kandan

dvadas
Nov 18th, 1999, 01:22 PM
no, that just gives me the grey background all the time, what i need is an autobitblt function

Aaron Young
Nov 18th, 1999, 01:37 PM
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.

'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
aarony@redwingsoftware.com
adyoung@win.bright.net