msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loading Images into an ImageList Control

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
HLong



Joined: 04 Oct 2007
Posts: 2

PostPosted: Wed Feb 27, 2008 4:04 pm    Post subject: Loading Images into an ImageList Control Reply with quote

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.

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
MikeD



Joined: 04 Oct 2007
Posts: 3348

PostPosted: Wed Feb 27, 2008 9:04 pm    Post subject: Re: Loading Images into an ImageList Control Reply with quote

"HLong" wrote in message @microsoft.com...
> 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

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
any limit to the number of images inserted in an imagelist c Hi All, Is there a maximum number of images that can be inserted in an imagelist control? Thanks in advance. DORI

Q: Extracting graphics from an ImageList control Hello group, I have an imagelist with graphics already inserted. However, I do not have the physical graphic files so I cannot remove any of the images. Is there any method of extracting icons from an imagelist control and saving them to the local machin

Images in WebBrowser control Hello Everybody, I have VB6 SE in WinXP SP2. Is there any method or API which could copy an image from a WebBrowser control (in a web page) to a destination on hard drive, without requiring re-download? Thank you, -- Syed Zeeshan Haider

Passing MSFlexgrid to a procedure as a control for loading d I have 5 different MSFlexgrids for displaying data. I want to redisplay any one of the 5 in a 6th which is in a different view of the form. I thought I could use anyone of the five to load the 6th MSFlexgrid. So I passed the 6th MSFG as a control to the

Not load images in a web page from a webbrowser control Hi to all. A question... Is their any way to don't load the images in a web page load from a webbrowser control?
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group