Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Get resource from project

Get resource from project

Scheduled Pinned Locked Moved C#
csharpc++graphicsquestionlearning
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi How i can retrive an resource (Bitmap for handle) from my project.Before now i handn't experince with .Net resorces and i anticipate this in the same way like in MFC projects, but there is no resource files, and i just add my bitmap inderectly to project(Project->Add New Item->Bitmap)is it correct? .And now i want to get the bitmap ID from my code. Where is a way to do so?? Thank.

    F 1 Reply Last reply
    0
    • A Anonymous

      Hi How i can retrive an resource (Bitmap for handle) from my project.Before now i handn't experince with .Net resorces and i anticipate this in the same way like in MFC projects, but there is no resource files, and i just add my bitmap inderectly to project(Project->Add New Item->Bitmap)is it correct? .And now i want to get the bitmap ID from my code. Where is a way to do so?? Thank.

      F Offline
      F Offline
      Franz Pentenrieder
      wrote on last edited by
      #2

      Check this article out Using Resources in Your Application Part I[^] or simple search for resources or resourcemanager.

      A 1 Reply Last reply
      0
      • F Franz Pentenrieder

        Check this article out Using Resources in Your Application Part I[^] or simple search for resources or resourcemanager.

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thank. Oddly enough, i suppose using resorces in NET became more simplest, but in oppositely it seems more complicated.

        F 1 Reply Last reply
        0
        • A Anonymous

          Thank. Oddly enough, i suppose using resorces in NET became more simplest, but in oppositely it seems more complicated.

          F Offline
          F Offline
          Franz Pentenrieder
          wrote on last edited by
          #4

          no not really, the only importand thing is: ResourceManager rm = new ResourceManager("app", this.GetType().Assembly); rm.GetObject( "keyname" ); // or rm.GetString( "keyname" ); no big deal - for editing resources u can use Resourcer[^]

          J 1 Reply Last reply
          0
          • F Franz Pentenrieder

            no not really, the only importand thing is: ResourceManager rm = new ResourceManager("app", this.GetType().Assembly); rm.GetObject( "keyname" ); // or rm.GetString( "keyname" ); no big deal - for editing resources u can use Resourcer[^]

            J Offline
            J Offline
            Judah Gabriel Himango
            wrote on last edited by
            #5

            In .NET 2.0, it's become even easier:

            // I've embedded an image named "arrow.jpg" into my resources, I can retrieve it like so:
            Image myImage = Properties.Resources.arrow;

            Any remotely useful information on my blog will be removed immediately. Judah Himango

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups