Jump to content

Saving and Accessing an image file to a Resource file: How?

- - - - -

  • Please log in to reply
4 replies to this topic

#1
oscarocasla

oscarocasla

    Newbie

  • Members
  • Pip
  • 5 posts
i can't save an image file to a Resource File. Also, i want to access it From the Resource File.. please help., any reply is highly appreciated..., thank you

#2
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
What do you mean you cant save a image file to the resource file? Do you mean folder? And you cant do it with code, or you literally cant put a image in the resource folder?
You should be able to just create a folder named "Resources" then goto, Project>Add Existing Item. and add it into the folder.

Then you can reach it with this line of code.
_ProjectNameHere_.Properties.Resources._PictureNameHere_

Hope this helps. ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#3
oscarocasla

oscarocasla

    Newbie

  • Members
  • Pip
  • 5 posts
thank you but what i mean was this., i'm trying to add an image programmatically to a resource file(.resx file) and also access it later..

#4
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
Oh ok. I think maybe what your looking for is this:
ResourceWriter Class (System.Resources)
ResourceWriter.AddResource Method (System.Resources)

Good luck ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#5
oscarocasla

oscarocasla

    Newbie

  • Members
  • Pip
  • 5 posts
It works!! thank you very much..:)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users