delphi Application.Restore; 简单用法  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi Application.Restore; 简单用法


TApplicationRestore(Delphi)
描述
本示例在表单上使用计时器。当应用程序运行并且您最小化应用程序时,计时器将启动,并且在发生OnTimer事件时,应用程序将返回其正常大小。然后计时器关闭,直到下一次最小化表单。确保将AppStartTimer方法声明为TForm1的公共方法。在窗体中放置一个TTimer对象,然后在OnTimer事件中输入Timer1Timer。

procedure TForm1.FormCreate(Sender: TObject);
begin
  Application.OnMinimize := AppStartTimer;
end;

procedure TForm1.AppStartTimer(Sender: TObject);
begin
  Timer1.Enabled := True;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Application.Restore;
  Timer1.Enabled := False;
end;

推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.036182165145874 seconds