How to convert Application.ActiveFormHandle to TForm object in Delphi?
delphi
Solution
If you have a window handle and want to get the VCL control to which this handle belongs you can use `FindControl`. If you just want to get the active form you can use `Screen.ActiveForm`.
Problem
We may get `THandle` of active form by `Application.ActiveFormHandle` or by `GetForegroundWindow` when `Application.Active = True`. But how to get active form object? Or how to convert `Application.ActiveFormHandle` to object on Delphi?