|
-
Aug 17th, 2000, 09:40 AM
#1
Thread Starter
Member
I have inherited a useless project to revamp. Its main functionality (of which there is little) involves having 4 image boxes sitting on top of each other, with transparent gifs being displayed in them, giving the effect when you change something on a combo box that it changes whichever of the transparent gifs that combo box relates to.
Its kind of a preview program for viewing what certain home layouts look like, crap really, but I have to tidy it up and the worst part of it is the flicker as it loads in the next image. The code to change the contents of the image box goes like this :
if combobox1.text ="whatever" then
image1.picture = loadpicture("whatever.gif")
end if
the form autoredraw is set to false.
Any idea why it flickers like mad ?
-
Aug 17th, 2000, 10:21 AM
#2
Frenzied Member
The reason why it flickers is because when you set the picture property of the image box it first clears the old picture and then sets the new one, so there is a fraction of a second where there is nothing there.
Your best bet is to create a memory DC the same size as your form and use paintpicture to put the images onto the offscreen DC and then when it's ready bitblt it onto the form.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|