c# - How to programatically access images in a resource file? -


I have 30 PNGs in the resource file and I want to see them again inside the timer. This timer has set the background image of the form to the next PNG of the form to create an original animation.

I can not find an easy way to enumerate the resource file and get it on the actual pictures. I'm eager to keep the references to images that are not fixed on their file names, so updating the naming of images within the resource file will not require me to update the code in this section.

Notes:

  • Images are named in order of the resource file ('image001.png', 'image002.png' , ...).
  • This resource file is used exclusively to store these images.
  •   private zeros form 1_load (object sender, event erggus e) {var list = WindowsFormsApplication1.Properties.Resources.ResourceManager.GetResourceSet (New system. Globalization.CultureInfo ("en-us"), true, true); Foreach (in system.collections.DictionaryEntry img list) {System.Diagnostics.Debug.WriteLine (img.Key); Use img.Value to get // bitmap}}  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -