MTSkull
Centurion
I used Plausably Damp's example to build this code. The example code works but mine does not. I added the files to the resource file, and can see them when I open the Resources.resx file but no matter what I try the myassembly call returns null. I have checked for case sensitivty and ensured that the names are acurate. Not sure where I am going wrong here.
Thanks
MT
C#:
private void chkPCBOne_CheckedChanged(object sender, EventArgs e)
{
//access the resource file where the graphic objects are embedded
Assembly myAssem;
myAssem = Assembly.GetExecutingAssembly();
System.IO.Stream BlueLED;
// this next line returns Null
BlueLED = myAssem.GetManifestResourceStream("HTPlus_BON.Images.LED_Blue.gif");
System.IO.Stream SeaGreenLED;
// this next line returns Null
SeaGreenLED = myAssem.GetManifestResourceStream("HTPlus_BON.Images.LED_Seagreen.gif");
Image TempImage;
if (chkPCBOne.Checked == true)
TempImage = new Bitmap(SeaGreenLED);
else
TempImage = new Bitmap(BlueLED);
led_One.Image = TempImage;
CheckBoxIntegrity();
}
Thanks
MT