I need to create an aftershow event for a form when a form becomes visible. I did write a code that works fine when the form is not modal but I still fight to get the solution for modal forms. I want to make a form that will be a parent form for all forms in my project. The only thought that I have is to re-write TCustomForm from VCL...
P.S. I have seen the solution from http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20690523.html?sfQueryTermInfo=1+onaftershow
I think it's hacky and don't like it. So, I need a correct solution even if it will need to re-wrote some VCL classes.
TAdvForm = class(TForm)
procedure DoAfterShow; dynamic;
property OnAfterShow: TNotifyEvent read FOnAfterShow write FOnAfterShow;
if Assigned(FOnAfterShow) then FOnAfterShow(Self);