5 つの MDI 子を持つメイン フォームがあります。メイン フォームが作成されると、mdi の子も作成されて表示されます。
画面上で別の場所を割り当てますが、表示されると、デフォルトの場所から始まり、新しい場所に不穏な方法で移動します. フォームを表示する前に場所を割り当てようとしましたが、予想どおり the.Show() を呼び出した後、デフォルトの場所に移動する傾向があります。デフォルトから新しい場所へのこの移動を表示しないようにする方法はありますか?
これがコードフラグメントです
groupSettingsForm.Show();
groupSettingsForm.Location = new Point(0, 0);
dsForm.Show();
dsForm.Location = new Point(groupSettingsForm.Width, 0);
dPlots.Show();
dPlots.Location = new Point(groupSettingsForm.Width, dsForm.Height);
alertsForm.Show();
alertsForm.Location = new Point(groupSettingsForm.Width, dsForm.Height + dPlots.Height);
dataValuesForm.Show();
dataValuesForm.Location = new Point(0, groupSettingsForm.Height);
私はこれを試しましたが、私にはうまくいきませんでした
groupSettingsForm.Location = new Point(0, 0);
groupSettingsForm.Show();
dsForm.Location = new Point(groupSettingsForm.Width, 0);
dsForm.Show();
dPlots.Location = new Point(groupSettingsForm.Width, dsForm.Height);
dPlots.Show();
alertsForm.Location = new Point(groupSettingsForm.Width, dsForm.Height + dPlots.Height);
alertsForm.Show();
dataValuesForm.Location = new Point(0, groupSettingsForm.Height);
dataValuesForm.Show();