473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Missing image in ListView

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
Nov 17 '05 #1
2 2067
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
----------------
"James" <jc******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Nov 17 '05 #2
No I am not using Application.EnableVisualStyles(). In fact, if I use
Application.EnableVisualStyles, Excel crashes when I close a form.

"Atul" <atulatsswaredotcom> wrote in message
news:uo***************@TK2MSFTNGP09.phx.gbl...
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
----------------
"James" <jc******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: amiro | last post by:
How do I redirect a non existing image link on my server to another image? On a page in "Server A", there's this tag: < img src="image_url_on_Server_B" > suppose I want to remove the image...
3
by: Maarten | last post by:
hi all, is there a way to show the icons of a file, used by the system in a listview. now i have something like: Private Sub AddFiles(ByVal nod As TreeNode) Dim strPath As String =...
1
by: Jeff Stewart | last post by:
Is there a procedure for determining whether or not an Image uses any of the indexed pixel formats, short of checking against each one? -- Jeff S.
3
by: J | last post by:
I tried to inherit 'Shot' class from 'Image' class, only to fail. It gives me the CS0122 error, which says that it can't access 'System.Drawing.Image.Image()'. What am I missing? using...
0
by: Frank_00001 | last post by:
I'm trying to create a RDLC report and need to add an image. However, the image wizard is not being displayed when I drag and drop the image control from the tool box. All the documentation I've...
23
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine...
1
by: Erik Lautier | last post by:
Hello, I'm using a multipart/form-data upload to put an image into SQL Server, and it appears to be working, but I'm unable to display the image. All I'm getting is the text of the URL we're on in...
2
by: Adam Teale | last post by:
hey guys Is there a builtin/standard install method in python for retrieving or finding out an image's dimensions? A quick google found me this:...
8
by: John | last post by:
Hi Pasrt of HTML - <div class='button'><input type='image' src='/images/check1.jpg'></input></div> Part of CSS - ..button {background-image: url(/images/check1.jpg); background-repeat:
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.