Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在、メインフォームの右側に直接配置したい新しいダイアログをユーザーが開くことができるメニューボタンがあります。ユーザーはこれらのダイアログを好きなだけ開くことができますが、最初に開いたダイアログ(ある場合)の上にカスケードしてほしいと思います。MdiLayoutを使用して同様のことを行う方法を見てきましたが、これは通常のダイアログ用です。
開いているすべてのダイアログをループして、各ウィンドウの場所を設定しますか?
this.Location = new Point(x,y);
また
int prevHeight =0; foreach (Form f in this.OwnedForms) { x += 5; y += prevHeight; f.Location = new Point(x, y); prevHeight += f.Height; }