.Net Excel Add-in missing images in ListView

  • Thread starter Thread starter James
  • Start date Start date
J

James

I created a .Net add-in for Microsoft Excel.When the application load, all
the images that will be used in the application will be loaded. I have a few
forms, and some of them contain ListView control. I used the LargeIcon view
with 72x40 pixel icons. The listview has about 20 items.

My problem is: Sometime the image is not displayed. The space for the image
is there, but the image is not displayed. The more interesting thing is:
this does not happen every time. It only happens about 50% of the time. I
walkthrough my code and there were nothing wrong. The images did loaded
properly, but some how not displayed.

I suspected the problem was originate from the GC. I tried to run a full GC
before the form that has ListView control in it but it doesn't help. Other
things like putting the images as BMP instead of inside the DLL also doesn't
work. Loading the images when the form loads also doesn't work.

Anybody has any idea?

Thank you.

James
 
Are you using XP themes using Application.EnableVisualStyles? If so, try
using Application.DoEvents imm afterwards.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
 
Back
Top