掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ドッキング状態の読込み (ID:8467)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Dockは推奨しないようなのでManualDockの場合です。 # あまり代わりありませんが Form2.Left := Ini.ReadInteger('General', 'Form2Left', Form2.Left); Form2.Top := Ini.ReadInteger('General', 'Form2Top', Form2.Top); Form2.Width := Ini.ReadInteger('General', 'Form2Width', Form2.Width); Form2.Height := Ini.ReadInteger('General', 'Form2Height', Form2.Height); if not Ini.ReadBool('General', 'Form2Floating', Form2.Floating) then begin Form2.ManualDock(Panel1); end; 表示に関しては特に注意すべき点はないと思います。 保存時に、 Ini.WriteBool('General', 'Form2Floating', Form2.Floating); ptLT.X := Form2.Left; ptLT.Y := Form2.Top; if Assigned(Form2.Parent) then begin ptLT := Form2.Parent.ClientToScreen(ptLT); end; Ini.WriteInteger('General', 'Form2Left', ptLT.X); Ini.WriteInteger('General', 'Form2Top', ptLT.Y); Ini.WriteInteger('General', 'Form2Width', Form2.Width); Ini.WriteInteger('General', 'Form2Height', Form2.Height); というように、Parentの座標からScreen座標に変換しておく必要があります。 # 通常、Floatingの状態ではParentはnilです。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.