Re: Loading Images into an ImageList Control

Tech-Archive recommends: Fix windows errors by optimizing your registry




"HLong" <HLong@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:09D962B2-AA4C-49B2-A651-26BE73B640EB@xxxxxxxxxxxxxxxx
Can someone explain how could I load images from a folder into the
ListImages
collection of an ImageList control. I am working on VBA. On my form I
have
a button to lunch the GetOpenFileName dialog to select the image files.
These image files could be in JPG, PNG, TIFF, BMP file formats
(preferably),
but I could have them on BNP only if required. Thanks.

I don't think I'd use an ImageList for this, particularly under VBA. If I
were doing this with VB6, I'd probably use an array or collection of
StdPicture objects and LoadPicture each picture to an instance of that
object. I also probably only do this if the number of pictures was
relatively small because it could potentially eat up a lot of memory if
you've got a lot of them loaded.

The ImageList control is basically intended to store icons or small bitmaps
to be used with a ListView and/or TreeView and/or ImageCombo control.

You'd be better off asking this in a VBA newsgroup for the product you're
using (for example: microsoft.public.word.vba.general,
microsoft.public.office.developer.vba, microsoft.public.excel.programming).

--
Mike
Microsoft MVP Visual Basic


.


Quantcast