Hydra Latest version.
In Delphi 7 IDE opening a form which inherits from THYVisualPlugin causes the exception
“Cannot focus a disabled or invisible window” to be displayed.
In Windows7 this message can be acknowledged, closed and you can continue to work.
In Windows10 this message can be acknowledged, but is redisplayed immediately meaning you cannot proceed in Delphi, the IDE needs to be forced closed.
Attached it the stack trace. The exception is caused by the following.
Hydra_Core_D7.bpl | uHYVisualPlugin | THYVisualPlugin | SetFocusedControl | 439 |
Could you just catch and discard this exception please.
hydra_exception.txt (85.4 KB)
function THYVisualPlugin.SetFocusedControl(Control: TWinControl): Boolean;
Result := True;
if ActiveControl <> Control then begin
Result := inherited SetFocusedControl(Control);
if not (csDesigning in ComponentState) then begin // added
if ActiveControl <> nil then
SendMessage(ParentWindow, WM_FOCUSOUTOFHOST, 0, 0);
Thanks, logged as bugs://83819
bugs://83819 got closed with status fixed.
This fix will be in next public build
I am observing the same issue in Delphi 2010 unless I wrap the call to Control.SetFocus in a try…except block.
Have you caught this issue in design-time (i.e. in IDE) or in run-time?