Solved

ImageList Draw method problem

Posted on 2001-07-31
3
348 Views
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.

SCML
0
Comment
Question by:scml
  • 2
3 Comments
 
LVL 6

Expert Comment

by:pierrecampe
Comment Utility
dont put an imagecontrol on the picturebox and use:
Picture1.AutoRedraw = True
Picture1.PaintPicture ImageList1.ListImages(1).Picture, posX, posY
0
 
LVL 6

Accepted Solution

by:
pierrecampe earned 200 total points
Comment Utility
scml
could you please not abandon this question:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20133913
0
 

Author Comment

by:scml
Comment Utility
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:

Picture1.Refresh

Thanks

p.s.: for question: http://www.experts-exchange.com/jsp/qManageQuestion.jsp?

I am sending a comment.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 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…

744 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

15 Experts available now in Live!

Get 1:1 Help Now