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