formhook OnFormRecreate event
Return to Introduction  Previous page  Next page
Applies to
acFormHook component.  

Declaration
property OnFormRecreate: TNotifyEvent;  

Description
The OnFormRecreate event occurs on recreation of form's window handle (for example, after changing of the BorderStyle or FormStyle property values).  
 
If your form style or extended style was forcedly modified by your program using SetWindowLong API (see Win32 Programmer's Reference for more information about SetWindowLong routine), or you have hooked the form's WndProc, then after form recreation all style changes will be overwritten by default form settings.  
 
Write the OnFormRecreate event handler to restore necessary form styles and hooks after recreation of your form.