开发者

Delphi - Set form to not focus on any component when it shows

Is there a way in Delphi to disallow the form to focus o开发者_JS百科n 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.


Use the following OnActivate event handler:

procedure TForm1.FormActivate(Sender: TObject);
begin
  ActiveControl:= nil;
end;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜