L
linuxping
Unregistered / Unconfirmed
GUEST, unregistred user!
我在类中封装了一个TTimer:
type TDlgText=class(TThread) //检查QQH里句柄的有效性加入文本文件保存.
private
FList:TThreadList;
FTime:TTimer; //记时器
..........
然后在TThread的Execute里创建Timer,并把OnTime事件和自己定义的函数联系起来:
procedure TQQText.Execute;
begin
inherited;
FTime:=TTimer.Create(frmMainOperation);
FTime.Interval:=350;
FTime.OnTimer:=MyOnTimer;
FTime.Enabled:=True;
end;
procedure TQQText.MyOnTimer(Sender: TObject);
var
sStr:string;
sFileName:string;
i:Integer;
FileHandle: Integer;
begin
CheckList;
with FList.LockList do
begin
for i:=0 to Count-1 do
begin
..................
但是,我在CheckList;处设置断点,发现MyOnTimer里的代码从来未被执行过!!!!!
期待解决!
type TDlgText=class(TThread) //检查QQH里句柄的有效性加入文本文件保存.
private
FList:TThreadList;
FTime:TTimer; //记时器
..........
然后在TThread的Execute里创建Timer,并把OnTime事件和自己定义的函数联系起来:
procedure TQQText.Execute;
begin
inherited;
FTime:=TTimer.Create(frmMainOperation);
FTime.Interval:=350;
FTime.OnTimer:=MyOnTimer;
FTime.Enabled:=True;
end;
procedure TQQText.MyOnTimer(Sender: TObject);
var
sStr:string;
sFileName:string;
i:Integer;
FileHandle: Integer;
begin
CheckList;
with FList.LockList do
begin
for i:=0 to Count-1 do
begin
..................
但是,我在CheckList;处设置断点,发现MyOnTimer里的代码从来未被执行过!!!!!
期待解决!