
Loading images and labels in picturebox
Quote:
>> I am using VB 6.0.
>> I am trying to add images and labels to a picturebox ccontrol. I need
>> to create a .BMP file displaying these contents. When I add multiple
>> images to the picture box only one is visible ( the last one as it is
>> inside a loop). I guess the other images are hidden behind this one. I
>> am having trouble setting the location of these images. Can someone
>> tell me what is wrong in my code ?
>> Following is the code that I used to accomplish the above :
>> 'Code for images
>> Picture2.AutoRedraw = True
>> Picture2.Picture = Picture_FT(Index).Picture
>> Picture2.CurrentX = snap!Hor_Loc
>> Picture2.CurrentY = snap!Vert_Loc
>> Am I missing something...
>Yes, as Ken said, this line is replacing your picrtures:
>> Picture2.Picture = Picture_FT(Index).Picture
>You need to use PaintPicture to copy the picture over.
> Picture2.PaintPicture Picture_FT(Index).Picture, X, Y
>(Set X and Y to whatever you need to position it correctly)
>LFS
Even using this the final image is a composit of the two, or more, images. NOT individual images.
If the OP is thinking of something like, for example, Animate GIF's then you'll need to have a PictureBox/ImageControl for each image and page through
them OR use the Animation Control OR an ImageList/ImageControl comibnation.. or some such thingie... :->
Have a good day...
Don