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.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
If I understand you correctly, you want the forms to appear on screen in a cascade effect:
If so, when using WinForms you can do this by ensuring that the
StartPosition
property of each form is set toFormStartPosition.WindowsDefaultLocation
(which it is by default).If you are using WPF, you need to set the
WindowStartupLocation
property toWindowStartupLocation.Manual
in a similar manner and not set a specific location for the window.This leaves Windows to position the form when it displays, which it does by using the cascading effect shown in the picture.