Improve company productivity with a Business Account.Sign Up


ImageList Draw method problem

Posted on 2001-07-31
Medium Priority
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 600 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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

595 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