Image List & Out of memory 
Author Message
 Image List & Out of memory

I am using the following code to copy the contents of a
picture box control to an image list:

ImageList2.ListImages.Add , , Picture1.Image

It generates a run-time error '7': Out of memory.

If I use the following code, I get an "invalid picture"
error:

ImageList2.ListImages.Add , , Picture1.Picture

The content of the picture box control is a single page of
text that was put in the box using the hDC of the picture
box control as part of a print preview procedure that
shows a page at a time in a picture box. I want to try to
store each page in the ImageList to recall when needed.

The code works with a *.bmp file, so I suspect it is
something to do with the format of the content of the
picture box, but I haven't been able to figure out a
workaround.

Can someone tell me what I am doing wrong?



Tue, 27 Jan 2004 05:06:58 GMT  
 Image List & Out of memory
I never could get ListImages to work with these page
images. I finally just declared a dynamic array of type
Picture to contain them and that seems to work.

I don't know if the issue with the ListImages collection
is a bug, memory leak or what.



Tue, 27 Jan 2004 23:08:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Tree List & Image List Separator

2. Saving Memory by using Image Lists

3. Image List \ Memory \ Animation

4. Image List and Running out of Memory

5. COMMON WINDOWS CONTROLS & IMAGE LIST OCX

6. Out of Memory Error & 64K memory limit

7. Image Control Supplied By Image List Control

8. I need to save an image from an image list to a file

9. how to scan image in black&white format using kodak image scan control

10. university EMR send outs

11. on the outs

12. Learning the ins and outs of Peek and Poke

 

 
Powered by phpBB® Forum Software