Layout边框中的LayoutMdi表单... [英] LayoutMdi in None border Forms ...

查看:150
本文介绍了Layout边框中的LayoutMdi表单...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi guy's

我使用此代码:



hi guy's
i'm used this code :

this.LayoutMdi(MdiLayout.Cascade);




Mdi儿童表格中的
...

Butt当表格没有边框不起作用时(边框样式=无)

我做什么?



in Mdi Child Form ...
Butt When the form is no border does not work (border style = None)
What I do ?

推荐答案

首先,我建议如果你可以停止使用MDI WinForms。这是一个真正过时的应用程序窗口模型,至少可以说是古怪。



你是对的Mdi无法平铺无边框的子窗体在正常的情况下。



我发现Mdi中的标准平铺行为(我上次使用它,很多年前)很糟糕,我只是写了我的自己的平铺代码。



如果你真的必须级联无边界MdiChild窗口,这里是一个丑陋的黑客:
First, I suggest that if it's possible you discontinue use of MDI WinForms. It's an Application Windowing model that is really outmoded, and, it is "quirky," to say the least.

You are right Mdi can't tile borderless child Forms under "normal" circumstances.

I found the standard tiling behavior in Mdi (last time I used it, which was many years ago) so bad that I just wrote my own tiling code.

If you really have to cascade borderless MdiChild windows here's an ugly hack:
private void Cascade()
{
    this.SuspendLayout();

    foreach (Form frm in this.MdiChildren) frm.FormBorderStyle = FormBorderStyle.FixedSingle;

    this.LayoutMdi(MdiLayout.Cascade);

    foreach (Form frm in this.MdiChildren) frm.FormBorderStyle = FormBorderStyle.None;

    this.ResumeLayout();
}

但是,如果这导致其他一些奇怪的行为,请不要怪我:)

But, don't blame me if this leads to some other strange behavior :)


这篇关于Layout边框中的LayoutMdi表单...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆