如何在C#中使用少边框MDI格式管理边框较少的子窗体? [英] How can manage border less child form with border less MDI form in C#?

查看:229
本文介绍了如何在C#中使用少边框MDI格式管理边框较少的子窗体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有没有border的自定义窗体。我在子窗体上应用该自定义窗体。我有自定义MDIParent表格,也没有边框。所以,我的问题是当我最大化子窗体然后顶部边框出现在MDIForm的侧面那么如何使用c#来管理或解决这个问题。查看我的快照以获取我的问题的更多细节我想从顶部删除最大化按钮的边框自定义MDIForm。



我尝试过:



我在堆栈溢出和许多其他网站上尝试了许多解决方案。

I have custom windows form that has no border.I apply that custom form on child form. And I have custom MDIParent Form that has also no border. So, My problem is when I maximise child form then top border of is appear out side of MDIForm so how can manage or solve this issue using c#.See my snapshot for more detail of my problem I want to remove border with maximise button from top of the custom MDIForm.

What I have tried:

I tried many solution available on stack overflow and many other web site.

推荐答案

嗨会员,



不真的是一个解决方案只是一些hacky但可能接受的workarrounds可以在这里找到 c# - 当MDI子项最大化时删除MDI容器表单的默认MDI菜单 - 堆栈溢出 [ ^ ]



但你可能已经看过这个解决方案...



我只是我希望与你的应用程序分享我的经验(带有自定义/模拟系统菜单的无边框表格):

在使用MDIContainer和Forms之后,我决定实现自己的逻辑 - 如果你只是那么困难并不困难想要模拟正常的窗口行为 - 想一想 - 只是一些简单的定位逻辑。 UserControls在主窗体上彼此叠加(在正常Z顺序中)的子窗体。我把MDI的所有麻烦都抛在脑后......



亲切的问候

Johannes
Hi Member,

Not really a solution just some hacky but maybe acceptable workarrounds can be found here c# - Removing the default MDI menu of a MDI Container form when a MDI Child is maximized - Stack Overflow[^]

But you maybe allready have seen this "Solutions"...

I just wanted to share my experience with applications like yours (borderless forms with custom/simulated system menu):
After Messing arround with MDIContainer and Forms I decided to implement my own logic - It's not that difficult if you just want to "simulate" normal window behavior - think about it - just some simple positioning logic. The Sub-forms where UserControls just layered on top of each other (in normal Z-Order) on the main-form. And I left all the hassles with MDI behind me...

Kind regards
Johannes


这篇关于如何在C#中使用少边框MDI格式管理边框较少的子窗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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