Background Image Resource Name
I am trying to find out if the background image in a set of pictureboxes is the same as any of my image resources. The following always returns "None" for all the pictureboxes although they all have the background image player.
foreach (Control ctrl in this.radGroupBox1.Controls)
{
ctrl.BackgroundImage = Resources.player;
if ((Image)ctrl.BackgroundImage == (Image)Resources.blank)
Console.WriteLine("Blank");
else if ((Image)ctrl.BackgroundImage == (Image)Resources.player)
Console.WriteLine("Player");
else
Console.WriteLine("None");
}
Not sure why :(