Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2007, 02:31 AM
Registered User
 
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default ImageList problem/bug

I add an image in the imageList i.e a.jpg of blue color. then compile the app and run. the control shows the blue image.

If I delete the image a.jpg from THAT PARTICULAR directory and copy a different image with the same name a.jpg in THAT directory. Windows automatically put the previous (blue) image back. and when run the app the application shows the previous image.

 
Old April 12th, 2007, 08:53 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you recompiling?

Chances are what's happening is that the image is an embedded resource. It's compiled directly into the assembly. Simply replacing the image file on disk won't change the binary data that's buried inside the compiled code. If you need to be able to use a image file as the source for something in a program, you'll need to write code to read the file and put it into the control(s).

-Peter
 
Old April 13th, 2007, 02:11 AM
Registered User
 
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx for your reply. Yesterday I got the answer myself that when 1 time compiled, it becomes part of the resource. If we want to display the other image ,we will have to add it in ImageList manually through the design view of the form and replace the previous one.






Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageList control chroniclemaster1 C# 2005 4 December 22nd, 2007 12:36 AM
Bug or no to bug learning C using VS.Net to compil tesh All Other Wrox Books 0 February 14th, 2007 01:06 PM
GridView problem or bug BMWTouring ASP.NET 2.0 Basics 0 January 30th, 2007 03:45 AM
ImageList/transparency problem jacob C# 0 February 27th, 2006 08:37 AM
Looping Images in ImageList? Nick.Net VB.NET 2002/2003 Basics 0 September 10th, 2004 08:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.