I am getting issue in below line :
taskbarNotifier2.SetBackgroundBitmap(new Bitmap(GetType(),"skin2.bmp"), Color.FromArgb(247, 247, 247));
Resource 'skin2.bmp' cannot be found in class 'WindowsFormsApplication2.Form1'.
I am getting issue in below line :
taskbarNotifier2.SetBackgroundBitmap(new Bitmap(GetType(),"skin2.bmp"), Color.FromArgb(247, 247, 247));
Resource 'skin2.bmp' cannot be found in class 'WindowsFormsApplication2.Form1'.
To use a Bitmap(Image) Resource
from the project resources,follow these steps;
Project Properties
in Visual Studio (press Alt+F7).Resources Tab
in Project Properties page.Resources Tab
select Images
in the first drop down list.Add Existing Item
from the second drop down list.Openfiledialog
asking you to select an image file,go on and select an image file from any of your folders.Resources Tab
,with a thumbnail image.The above steps add an image resource to your project.
Now to access the image resource in your project,use Properties.Resources.(ResourceName),where ResourceName is the name of image (say) that you've added just now.
Please note an image resource returns an Image
object which you can use anywhere where an Image
is required.
To explain the last step(assume you have a PictureBox,and you want to display the image resource in the PictureBox), set the image property of PictureBox to this image resource like this;
pictureBox1.Image=Properties.Resources.(ResourceName);
Make sure to replace (ResourceName) with the name of image you've added just now.
Hope it helps you.