C#层叠的形式而不MDI父? [英] C# Cascading forms without mdi parent?

查看:258
本文介绍了C#层叠的形式而不MDI父?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在C#中的一个项目,它的一部分需要一个窗口中打开的多个实例。有没有简单的方法来级联形式的实例?我假设我不得不处理需要手动数学。我只是不能换我的头周围,有任何意见或建议,将不胜感激。

I have been working on a project in C#, a portion of it requires multiple instances of a window to open. Is there any easy way to cascade the instances of the form? I'm assuming I'd have to deal with the math required manually. I just cannot wrap my head around it, any comments or suggestions would be greatly appreciated.

推荐答案

如果我理解正确的话,你希望形成以级联效应在屏幕上显示:

If I understand you correctly, you want the forms to appear on screen in a cascade effect:

如果是这样,使用的WinForms时,你可以通过确保做到这一点的的 中StartPosition 每个窗体的属性设置为 FormStartPosition.WindowsDefaultLocation (这是默认设置)。

If so, when using WinForms you can do this by ensuring that the StartPosition property of each form is set to FormStartPosition.WindowsDefaultLocation (which it is by default).

如果你正在使用WPF,你需要设置的 WindowStartupLocation 属性 WindowStartupLocation.Manual 以类似的方式,而不是为窗口设置一个特定的位置。

If you are using WPF, you need to set the WindowStartupLocation property to WindowStartupLocation.Manual in a similar manner and not set a specific location for the window.

这叶Windows来定位表格时,它会显示,这确实通过使用图中显示的级联效应。

This leaves Windows to position the form when it displays, which it does by using the cascading effect shown in the picture.

这篇关于C#层叠的形式而不MDI父?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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