public frmMain() { InitializeComponent(); //解决窗体第一次设置为最大化后,点击最大化按钮窗体无法居中问题 int x = Convert.ToInt32((Screen.PrimaryScreen.WorkingArea.Width - this.Width) * 0.5); int y = Convert.ToInt32((Screen.PrimaryScreen.WorkingArea.Height - this.Height) * 0.5); t
procedure TForm1.FormActivate(Sender: TObject); var i: Integer; begin btn8.Enabled:=False; do begin Sleep(); btn8.Caption := Format('请认真查看(%d)', [I]); //ShowMessage(IntToStr(i)); then btn8.Enabled:=True; Application.ProcessMessages; end; end; Applica