I asked someone for a question, and he showed me some code, and I read and understood, but I found one thing here:
Form1.OnClose := MyOnClose;
This will make the Form1.OnClose event call MyOnClose procedure instead of its OnClose procedure. But this will occur another issue, some forms need to execute something in its OnClose procedure, so I cannot ignore it, but I need every form call MyOnClose when it close, how? Is this inherited? I cannot modify so many forms - too many forms, so, how to inherit the form1(and other forms in this case) its own OnClose and then call MyOnClose?