ADO DOT NET Posted January 6, 2007 Posted January 6, 2007 hi a problem! i think may be a bug in vs.net 2005 you just put a picturebox on a form, click on image property and import a jpg picture to the application resources! press ok. that's ok now. the problem is that if at a later point you want to remove that image from the resources you CANNOT! the only way is that right click on the project explorer and open resources folder and remove the file from there, it will be removed but a warning will appear that this file does not exists! and your application won't work until you copy a file named that deleted one in the same directory... ??? Quote
Leaders snarfblam Posted January 6, 2007 Leaders Posted January 6, 2007 If you remove the image from the picturebox (right click the value of the Image property in the designer and select "Reset") does the resource not get removed from the resource file? Quote [sIGPIC]e[/sIGPIC]
ADO DOT NET Posted January 6, 2007 Author Posted January 6, 2007 (edited) ok here is a sample! if you remove an image file from the app resources, as I did in (pic1). you won't be able to run the app anymore (pic2) it seems that if we add a file to the resources, we won't be able to remove it later!WindowsApplication1.zip Edited January 6, 2007 by ADO DOT NET Quote
Administrators PlausiblyDamp Posted January 6, 2007 Administrators Posted January 6, 2007 If you go into the project properties and then select the resources tab simply remove it from there and it should work fine. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Leaders snarfblam Posted January 9, 2007 Leaders Posted January 9, 2007 (edited) Or, to be more general, remove the resource the same way you added it. If you simply directly added it to the solution explorer, you should be able to simple directly delete it. If you use the resource editor to add it, use the resource editor to remove it. If it is a local resource, such as an image on a button, it should automatically be deleted when the resource isn't needed, such as when you change or remove the button image. [Edit]If you add an image as a project resource through a Form designer it would need to be removed through the Resource editor.[/Edit] Edited January 9, 2007 by snarfblam Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.