Image chaching and graphics resources...

G

Guest

I've got a winForm that has a good number of custom controls with custom graphics that are stored as resources in the project.
Recently, I updated all of the graphics with a new look. Added all the new images into the resource file and deleted all the old images.

But whenever the form is displayed in the designer, all of the old images still flash in before being painted over with the new images. Where is Visual Studio getting that graphics information? I've tried clearing out the bin and object folders and recompiling everything. Stopped and restarted VS, etc., etc... But I can't seem to get the old graphics out of the system.

Where is VS caching the old graphics? Why are they still hanging around like ghosts?

Any insight is appreciated.

Also, any resources that you can direct me towards as far as better understanding the way .Net deals with graphics would be great. My app seems to be really slow regardless of the fact that the code is pretty simple. I think it's all related to whatever the framework is doing that's keeping ghosts of my images in my app...

J
 
L

Linda Liu [MSFT]

Hi J,

This is a quick note to let you know that I am performing research on this
issue and will get back to you ASAP.

I appreciate your patience!


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
L

Linda Liu [MSFT]

Hi J,

I performed a test on this issue. The following is the steps of my test.

1. Create a WinForm application project. Add a UserControl in the project.

2. Double-click the Resources.resx under the Properties folder in the
Solution Explorer to open it in the designer and add a picture in it.

3. Set the UserControls's BackgroundImage property to the picture in the
project resource file.

4. Build the project and drag&drop the UserControl on a form. The
UserControl shows the picture as its background image on the form in the
designer.

5. Open the Resources.resx in the designer, and add another picture in it.

6. Set the UserControl's BackgroundImage property to the new picture added
in the project resource file.

7. Build the project and re-open the form containing the UserControl. The
UserControl still shows the previous picture.

It seems that the previous picture has been cached by the form. I open the
form's resx file in the designer and switch to the Images view and see that
the previous picture is there.

Delete the cached picture in the form's resx file and re-open the form. I
see the UserControl shows the new picture as its background image now.

Please try my suggestion and let me know the result.

Sincerely,
Linda Liu
Microsoft Online Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top