Adding background image to MDI form
I would like to request people to give me inputs on how to show a background image in a winform开发者_Python百科s 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
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);
}
精彩评论