Solved

Imagelist Corruption

Posted on 2000-02-29
14
358 Views
Last Modified: 2010-04-04
Hiya, I have a problem that is driving me *wild* (grr... ;O) )

  We have an application that has many imagelists, with around 50 images per list (4 of them on different forms within the application)...

  Both me and one of my colleagues have a problem that occasionally these imagelists corrupt (looks like the same mask is used with a different image inside it)...

  We have tried:

  1) Downloading the latest drivers
  2) adding BusThrottle=1 to the [display] section of the SYSTEM.INI file
  3) Reducing the hardware acceleration
  4) Getting the latest DirectX drivers

  I have a PII 350 with an ATI Rage Pro AGP graphics card, and my colleague has a Twin celeron 350 with an S3 PCI graphics card.

  We both have Windows 98, and are both using Delphi 5 (service pack 1)

  Any ideas?

  Tim.
0
Comment
Question by:AttarSoftware
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2569080
? no, you've just done what i could suggest
0
 

Expert Comment

by:PetriWork
ID: 2570183
Think of that images in a ImageList are stored on one big surface. Also don't mix image sizes at all...
I guess you already know this but it should be said...
0
 
LVL 1

Author Comment

by:AttarSoftware
ID: 2572136
Yeah, all my images ar 16x16 in 256 color...

The biggest imagelist (which corrupts the most) contains around 75 images...

Tim.
0
 

Expert Comment

by:PetriWork
ID: 2572210
Ok, that shouldn't be a problem then, check if changing the desktop colordepth helps.
I've used imagelists with thousands of 32*32*16 images so as you don't use "large" images you should have no problem....
Can you further describe the error symptoms?
0
 

Accepted Solution

by:
PetriWork earned 100 total points
ID: 2572235
From the Delphi help:
Note:      Image lists depend on Comctl32.dll. If the system does not have the latest version installed, there may be problems getting images to appear.
0
 

Expert Comment

by:PetriWork
ID: 2572480
Also, did you have the problem before installing Update Pack 1?
0
 
LVL 1

Author Comment

by:AttarSoftware
ID: 2572765
Yeah, we have always had the problem...
I will check for a later version of Commctl32.dll, that is a good idea...

As for the symptoms, imaging that all of your images retain their shape, but the conttent gets shuffled.

Imagine the error occurs with imagelists with only two images (which it doesn't seem to do, but it will make it easier to explain)...

  1) A green square
  2) A red triangle

When the corruption occurs, you end up with a green square that is clipped to the shape of the triangle, and a red triangle that has been clipped to the size and shape of the square...  

It is really odd...  and as you can understand, the problem is much worse with 75 256 color shaded images! :O)

Tim.
0
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.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 2572781
? this problem i had sometimes with delphi, if the resources are very low at my workstation
0
 
LVL 1

Author Comment

by:AttarSoftware
ID: 2572793
Maybe going to Win98 release 2 would help?
0
 
LVL 3

Expert Comment

by:SteveWaite
ID: 2572859
I'm not sure if this little snippet helps but maybe rings a bell with someone somewhere...

I found D4/MS image lists implementation a pain with compatibility issues arising from Win95/IE4 versions. I've seen mangled images and none at all in menus on certain PC's. I'm afraid I'm too dull to remember exactly but I think the worst problems were found on early Win95 with IE4 updates. You may be right in going for later OS's. Beats ditching image lists?.

Steve
0
 

Expert Comment

by:PetriWork
ID: 2574285
I've used an ImageList containing 4-20 images (handled dynamically) on several types of configuartions with no problems. Low resources is a possible problem but if you get to that point it's something else that is the problem. ImageList is used to conserve resources.
AttarSoftware, try checking the Microsoft Knowledgebase and Borland Community pages. They'd probably give a lot when it comes to bugs in TImageList. I wen't the whole race about half a year ago but now my ImageLists even work with S3 cards (whoo). These two places really helped me out.
Btw. Dynamic ImageLists are much more prone to errors than static ones. Are your Imagelist's content generated at run-time or are the images in the ImageLists already? If they're generated at runtime try doing all the stuff at design-time and see what happens.
0
 
LVL 1

Author Comment

by:AttarSoftware
ID: 2576961
They are all static imagelists, poulated at design time...I check out the Microsoft Knowledgebase and Borland Community pages.  

I also upgraded to Win98 Second Edition this morning, so I will give it till tommorrow afternoon and if it hasnt corrupted again then I will assume that fixed it...

I hate intermittent bugs...

Be right back ;O)

Tim.
0
 

Expert Comment

by:PetriWork
ID: 2577568
Imagelist can be a real pain sometimes =]. Though that they are created at design time means you've got a little more control over them...
0
 
LVL 1

Author Comment

by:AttarSoftware
ID: 2591140
Well, going to Win98 Second Edition seems to have killed the problem (well, at least I havent had it for 3 days now), so I will be a good little expert, and accept this answer ;O)

Thanks :)

Tim.
0

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

Suggested Solutions

Title # Comments Views Activity
creating manifest for my dll that called from activex 6 100
Wininet read php file from internet issue 6 83
Simple Delphi Question 9 83
Help on project with Soap 10 48
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

22 Experts available now in Live!

Get 1:1 Help Now