Reputation: 14632
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?
Upvotes: 2
Views: 2531
Reputation: 37221
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
.
Upvotes: 7