03-18-2003, 02:25 PM
hi! i have a problem with images....
i'm making a counter with 3 digits, the counter and the digits are made with photoshop. so i'm using 4 image controls: one for the background, and one for each digits. i'm quite a newbie to visual basic, so i don't know if there is any better way of doing this...
the problem is that when i increment the counter there is a lot of flickering. is there any way of reducing it? i can0t use pictureboxes because i need transparencies (to be able to put one image over another).
03-19-2003, 12:42 AM
Use an image list control and whenever you want to change picture of your image control, get the image from image list control not directly from image file.
03-19-2003, 03:35 AM
Image controls flicker.
The "flicker free" way is to use a picturebox. I understand that you need transparency, but there are ways around this.
For instance, you can have your background in the picturebox, then use a mask to "cut" a hole in it for your foreground image. I believe you can use the paintpicture method for this, but I normally use BitBlt. If you have the AutoRedraw property set to TRUE, all the manipulation will take place in the "backplane". When you call the REFRESH method, the completed image will be drawn to view instantly with no flicker.
03-19-2003, 05:35 AM
ok.... i'm sort of combining both the answers....
i'm using an image list, overlaying the images I need in every moment, and then pasting the resulting image into a picture box (if i pasted it into an image control i still had the flickering..). this work perfectly and there is no flickering.
the problem is that the imagebox resizes to the image size, whereas the picturebox doesn't. also, the resulting image is also a rounded shape, so it also needs to be transparent. i think I could use your solution BillSoo but i don't really understand how to 'cut a hole' in the background.
thank you both very much!!!
03-19-2003, 11:57 AM
Try this link:
03-19-2003, 01:25 PM
ok I understand now, thank you!! ;)