I have a label that is setup to look like a UK Standard Number Plate.
The font is set to Charles Wright.
I want to be able to toggle the background image of this label with the use of a button, but I want this button to be able to identify what image is currently being used so that it can change the image accordingly.
The images are stored in the 'Properties.Resources' as 'plainFrontNumberPlate.bmp' and 'borderedFrontNumberPlate.bmp'.
I have tried:
if(this.label1.Image == Resources.plainFrontNumberPlate)
{
this.label1.Image = Resources.borderedFrontNumberPlate;
}
else
{
this.label1.Image = Resources.plainFrontNumberPlate;
}
But when I try to test this. The first click changes the image to 'borderedFrontNumberPlate.bmp but not back to 'plainFrontNumberPlate.bmp when I click a twice.