PizzaProgram 9 Posted November 11, 2022 I'm using a simple procedure to save and load form positions under Delphi 7. procedure LoadSavePos(f: TForm; save: Boolean); begin ... if not save then begin ScreenSnap := True; f.Top := t; f.Height := h; ... But if I set these values during `OnShow` procedure, they get ignored, and the window is restoring to the position of: - before the ScreenSnap happened ! 😞 ScreenSnap is that: - Any time the user is resizing the window, and nearing to the edge, the form "jumps" to full height or width. That's fine, it should work like this, but I can not set those positions, only if I restart the whole program, and the form is showed initially, loading the new values. My guess is it may has to do with the https://www.alphaskins.com components, but it is extremely hard to debug it. Share this post Link to post
FPiette 383 Posted November 11, 2022 Override the form's DoShow procedure and from there post a custom message to the form. In the corresponding message handler restore the form position and size. If you want an example, look at https://github.com/fpiette/OvbImgOrganizer/blob/main/Source/OvbImgOrganizer.Main.pas 1 Share this post Link to post