ImageList Draw method problem

Posted on 2001-07-31
Last Modified: 2008-02-01
Hi everybody,

I have a PictureBox on which there is an image control with an image covering the whole PictureBox.

I am using:

ImageList1.ListImages(1).Draw Picture1.hDC, posX, posY, 0

in a loop to draw multiple small images.

The problem is that when I open a new window and then close it, all the small images drawn using the imagelist draw method are erased exactly at the position the other window occupied.

Your solutions would me much appreciated.

Question by:scml
  • 2

Expert Comment

ID: 6338928
dont put an imagecontrol on the picturebox and use:
Picture1.AutoRedraw = True
Picture1.PaintPicture ImageList1.ListImages(1).Picture, posX, posY

Accepted Solution

pierrecampe earned 200 total points
ID: 6338938
could you please not abandon this question:

Author Comment

ID: 6341260
I tried your solution:

Picture1.AutoRedraw = True
Picture1.PaintPicture ImageList1.ListImages(1).Picture, posX, posY

and the drawing does not occur. But searching another source I found that it had to completed by:



p.s.: for question:

I am sending a comment.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question