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

Resource Problem

Scheduled Pinned Locked Moved C#
questioncomgraphicshelplearning
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.
  • R Offline
    R Offline
    Rick van Woudenberg
    wrote on last edited by
    #1

    Dear all, Quick question. I'm trying implement the project " TaskBarNotifier " ( http://www.codeproject.com/cs/miscctrl/taskbarnotifier.asp[^] in my application. On compilation everything goes well, but during execution it throws an exception: Resource 'skin.bmp' cannot be found in class 'ICNS.MainApplication'. I've added the bmp to the resources, even tried setting the path manually but to no avail. I've put the following code in the constructor of my main form : //Setting stuff for the TaskBarNotifier taskbarNotifier = new TaskbarNotifier(); taskbarNotifier.SetBackgroundBitmap(new Bitmap(GetType(), "skin.bmp"), Color.FromArgb(255, 0, 255)); taskbarNotifier.SetCloseBitmap(new Bitmap(GetType(), "close.bmp"), Color.FromArgb(255, 0, 255), new Point(280, 57)); taskbarNotifier.TitleRectangle = new Rectangle(150, 57, 125, 28); taskbarNotifier.ContentRectangle = new Rectangle(75, 92, 215, 55); taskbarNotifier.ContentClick += new EventHandler(ContentClick); taskbarNotifier.CloseClick += new EventHandler(CloseClick); Can anyone tell me what I am doing wrong ?

    P 1 Reply Last reply
    0
    • R Rick van Woudenberg

      Dear all, Quick question. I'm trying implement the project " TaskBarNotifier " ( http://www.codeproject.com/cs/miscctrl/taskbarnotifier.asp[^] in my application. On compilation everything goes well, but during execution it throws an exception: Resource 'skin.bmp' cannot be found in class 'ICNS.MainApplication'. I've added the bmp to the resources, even tried setting the path manually but to no avail. I've put the following code in the constructor of my main form : //Setting stuff for the TaskBarNotifier taskbarNotifier = new TaskbarNotifier(); taskbarNotifier.SetBackgroundBitmap(new Bitmap(GetType(), "skin.bmp"), Color.FromArgb(255, 0, 255)); taskbarNotifier.SetCloseBitmap(new Bitmap(GetType(), "close.bmp"), Color.FromArgb(255, 0, 255), new Point(280, 57)); taskbarNotifier.TitleRectangle = new Rectangle(150, 57, 125, 28); taskbarNotifier.ContentRectangle = new Rectangle(75, 92, 215, 55); taskbarNotifier.ContentClick += new EventHandler(ContentClick); taskbarNotifier.CloseClick += new EventHandler(CloseClick); Can anyone tell me what I am doing wrong ?

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Not sure but you may want to ask the author of the article...

      "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      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