delphi winform程序怎么实现SESSION那样功能程序,如打开不用 45分钟后自动关闭或者退出 谢谢指点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用一个全局变量+timer...unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls;type TForm1 = class(TForm) Timer1: TTimer; procedure Timer1Timer(Sender: TObject); procedure FormClick(Sender: TObject); private { Private declarations } public { Public declarations } end;const timeout:Integer=10;var Form1: TForm1; timecount:Integer=0;implementation{$R *.dfm}procedure TForm1.Timer1Timer(Sender: TObject);begin Inc(timecount);end;procedure TForm1.FormClick(Sender: TObject);begin if( timecount>=timeout) then begin ShowMessage('已超时'); Exit; end; timecount:=0;end; 动态生成控件的问题。。。 刚学DLL简单的问题路过的帮看看 ComboBox上下左右光标键的自定义如何实现 谁来帮帮我女朋友,很简单的问题 简单问题,大家快来抢分!!!!! 我用ODBC连接SYBASE速度特别慢,有其它的方式吗? 如何把文本文件作为资源加入到工程之中? 挑战——如何将一个图像存到数据库中 我最近发现dephi写的程序总是在调试状态下运行 那位知道如何在DELPHI中用 WINDOWS API (GDI)函数显示一幅图象 ? 怨念,Delphi 7的设计者是怎么想的? 亮剑:还在酝酿?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;type
TForm1 = class(TForm)
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
const timeout:Integer=10;
var
Form1: TForm1;
timecount:Integer=0;
implementation{$R *.dfm}procedure TForm1.Timer1Timer(Sender: TObject);
begin
Inc(timecount);
end;procedure TForm1.FormClick(Sender: TObject);
begin
if( timecount>=timeout) then
begin
ShowMessage('已超时');
Exit;
end;
timecount:=0;
end;