Results 1 to 4 of 4

Thread: bitblt

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    4

    Post

    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?

  2. #2
    Member
    Join Date
    Aug 1999
    Posts
    52

    Post

    hi,

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

    kandan

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    4

    Post

    no, that just gives me the grey background all the time, what i need is an autobitblt function

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width