为什么下面的代码第一次不起作用,第二次才有效果?我希望将关于对话框显示在父窗口的中间位置。procedure TFormMain.MenuHelpAboutClick(Sender: TObject);
begin
FormAboutBox.Left := Self.Left + Self.Width div 2 - FormAboutBox.Width div 2;
FormAboutBox.Top := Self.Top + Self.Height div 2 - FormAboutBox.Height div 2;
FormAboutBox.ShowModal;
end;
begin
FormAboutBox.Left := Self.Left + Self.Width div 2 - FormAboutBox.Width div 2;
FormAboutBox.Top := Self.Top + Self.Height div 2 - FormAboutBox.Height div 2;
FormAboutBox.ShowModal;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货