FreeonTerminate:=True;
i:=0 ;
while 1<2do
begin
i:=i+1;
sleep(30000);
dm.DtCC_hint1.Active:=false;
dm.DtCC_hint1.SQL.Text:=' SELECT CC_Hint.p_na, CC_Hint.worktime, CC_Hint.title, CC_Hint.hinttime, '+
' dbo.CC_Hint.remark, cc_hintperson.p_name, CC_Hint.msgid '+
' FROM CC_Hint left outer JOIN '+
' cc_hintperson ON CC_Hint.msgid = cc_hintperson.msgid '+
' where left(convert(varchar,CC_Hint.hinttime,108),5)='''+formatdatetime('hh:mm',now)+''''+
' and cc_hintperson.p_no='+inttostr(untdm.vCurUserID);
dm.DtCC_hint1.Active:=true;
dm.DtCC_hint1.First ;
while (not dm.DtCC_hint1.Eof)do
begin
if Terminated then
break;
frmhintrun.cxTextEdit1.Text:=dm.DtCC_hint1.fieldbyname('p_na').asstring ;
frmhintrun.cxTextEdit2.Text:=dm.DtCC_hint1.fieldbyname('p_name').asstring ;
frmhintrun.cxTextEdit3.Text:=formatdatetime('hh:mm',dm.DtCC_hint1.fieldbyname('worktime').asdatetime);
frmhintrun.cxTextEdit4.Text:=dm.DtCC_hint1.fieldbyname('title').asstring ;
frmhintrun.cxMemo1.Lines.Text:=dm.DtCC_hint1.fieldbyname('remark').asstring ;
frmhintrun.Left:=screen.Width-frmhintrun.Width ;
frmhintrun.top:=screen.Height -frmhintrun.height-30 ;
frmhintrun.ShowModal;
// frmhintrun.BringToFront ;
dm.DtCC_hint1.Next ;
end;
end;