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. Visual Basic
  4. PLEASE PLEASE PLEASE HELP, Embedding images and icons.

PLEASE PLEASE PLEASE HELP, Embedding images and icons.

Scheduled Pinned Locked Moved Visual Basic
helphardwarelearning
2 Posts 2 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.
  • N Offline
    N Offline
    Namboy82
    wrote on last edited by
    #1

    Hi I have posted this problem before, it is about embedding images or icons into your exe. I have been told to use an image list or changing the image/icon to embedded resources. But the code to retrieve them doesnt quite work. Can any body provide code to retrieve the image/icon back from changing it into an embeded resource or from using an image list. Thanks Vu

    D 1 Reply Last reply
    0
    • N Namboy82

      Hi I have posted this problem before, it is about embedding images or icons into your exe. I have been told to use an image list or changing the image/icon to embedded resources. But the code to retrieve them doesnt quite work. Can any body provide code to retrieve the image/icon back from changing it into an embeded resource or from using an image list. Thanks Vu

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      First, lookup 'ResEditor' in the Visual Studio documentation. You'll have to compile this little tool and use it to create a .resources file with your image information in it. Simple Add an image, give it a resource name, then click on the little '...' button and point it at image file that it is going to represent. Keep adding names and resources... then save this file as a .resources file in your project folder. Next, add the .resources file to your project in the Solution Explorer. Then in your code, you can use something like this: (This is the initialization code for a component I'm writing)

          Private m\_img\_LightOn As Image
          Private m\_img\_LightOff As Image
      

      #Region " Windows Form Designer generated code "
      .
      .
       
      **' Load our internal resource files
      Dim thisAssembly As System.Reflection.Assembly = Me.GetType.Assembly

              Dim resManager As New System.Resources.ResourceManager( "BinaryDisplay.BinaryDisplay", thisAssembly )
      

      m_img_LightOn = CType(resManager.GetObject("BMP_LIGHTON"), System.Drawing.Image)
      m_img_LightOff = CType(resManager.GetObject("BMP_LIGHTOFF"), System.Drawing.Image)** End Sub

      RageInTheMachine9532

      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