开发者

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);
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜