Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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...

???

  • Leaders
Posted
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?
[sIGPIC]e[/sIGPIC]
Posted (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

pic2.GIF.fad256c723f56a0a5e777c59d215de95.GIF

Edited by ADO DOT NET
  • Leaders
Posted (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 by snarfblam
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...