开发者

Adding background image to MDI form

开发者 https://www.devze.com 2023-01-14 07:58 出处:网络
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 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

精彩评论

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

关注公众号