My project consists of a form with a panel that contains a custom control. In this custom control I have buttons that change the background image.
My issue is; these buttons only change the background image of the custom control that they are placed in, and I need them to change the background image of the main form containing the panel with the custom control.
My current code:
this.BackgroundImage = Image.FromFile(System.IO.File.ReadAllText(BackgroundSkinsPath));
I need something that will in effect accomplish this:
MainForm.BackgroundImage = Image.FromFile(System.IO.File.ReadAllText(BackgroundSkinsPath));
ie: Change background image of MainForm.cs
from CustomControl.cs