I need two procedures, for displaying child forms normal or modal.
I got a normal mainform (not MDI) and like to call
OpenFormNormal or OpenFormModal
The child forms needs to be repositioned at there old position and size, stored in the registry. This position needs to be stored when a child form closes.
procedure OpenFormNormal(AFormclass : TFormClass);
procedure OpenFormModal(AFormclass : TFormClass);
Thats all. but all must work, like minimize, maximize, keep inside the mainform.
More detailled:
This procedures need to set the parent of the form to the application mainform, so the new forms will be child forms in top of the mainform. This means, even you set the focus to the mainform, the childforms are still in top of the mainform (Like MDI). I have tryed this with the windows API function SetParent().
If a childform will be closed, the last position, size must me written into the registry.
If a childform is opened and a position, size is stored in the registry, then the form must be opened in the same position and size, otherwise the form must be positioned in the center of the application mainform, but not outside the desktop area.
Size will only stored / recovered if the borderstyle is sizeable.
If a minimized form will be closed, then it will be recovered in normal state in the last position / size.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
## Platform
Delphi 7