Is there a way in Delphi to disallow the form to focus on any of its components but not disabling those components? I tried Self.SetFocus on FormActivate event of the form but the program says that it cannot focus on a disabled component.
+7
A:
Use the following OnActivate event handler:
procedure TForm1.FormActivate(Sender: TObject);
begin
ActiveControl:= nil;
end;
Serg
2010-07-21 07:42:11
ok solved, thanks Serg :)
rajeem_cariazo
2010-07-21 08:01:13
@rajeem_cariazo; So set this answer as your accepted answer.
SimaWB
2010-07-21 10:28:02