string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName);
//IntPtr bmp = new IntPtr();
FileStream fst = new FileStream(appPath + "\\logo.ico", FileMode.Open);
Icon icon = new Icon(fst);
Bitmap bmp = new Bitmap(icon.Width, icon.Height);
//Create temporary graphics
Graphics gxMem = Graphics.FromImage(bmp);
//Draw the icon
gxMem.DrawIcon(icon, 0, 0);
//Clean up
gxMem.Dispose();
//Bitmap bmp = new Bitmap(appPath + "\\logo.jpg");
this.pictureBox1.Image = (Image)bmp;
//IntPtr bmp = new IntPtr();
FileStream fst = new FileStream(appPath + "\\logo.ico", FileMode.Open);
Icon icon = new Icon(fst);
Bitmap bmp = new Bitmap(icon.Width, icon.Height);
//Create temporary graphics
Graphics gxMem = Graphics.FromImage(bmp);
//Draw the icon
gxMem.DrawIcon(icon, 0, 0);
//Clean up
gxMem.Dispose();
//Bitmap bmp = new Bitmap(appPath + "\\logo.jpg");
this.pictureBox1.Image = (Image)bmp;