Reputation: 59
I would like to request people to give me inputs on how to show a background image in a winforms MDI Application.
I understand that it is possible through the MDI form.
Any inputs on how to go about it would be welcome.
Thanks so much
Regards bornagaindeveloper
Upvotes: 0
Views: 5568
Reputation: 941505
Winforms doesn't give you direct access to the MDI client window. You have to find it, like this:
protected override void OnLoad(EventArgs e) {
foreach (Control ctl in this.Controls) {
if (ctl is MdiClient) {
ctl.BackgroundImage = Properties.Resources.SampleImage;
break;
}
}
base.OnLoad(e);
}
Upvotes: 4