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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

943 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now