高 高小五 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #1 各位大虾,在DELPHI中怎么解决这个问题: 打开一个窗口后,如果5分钟没有人操作过,则自动关闭此窗口以及上一级窗口, 并且返回到主窗体。
S shenloqi Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #2 用鼠标钩子和键盘钩子,检查鼠标键盘多就没有操作了。
任 任豆豆 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #3 TApplicationEvents和Ttimer结合使用即可 procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin Timer1.Enabled := False; end; procedure TForm1.ApplicationEvents1Idle(Sender: TObject; var Done: Boolean); begin Timer1.Enabled := True; end; procedure TForm1.Timer1Timer(Sender: TObject); begin form1.Close; (form1.Parent as Tform).close; end; 快试试吧
TApplicationEvents和Ttimer结合使用即可 procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean); begin Timer1.Enabled := False; end; procedure TForm1.ApplicationEvents1Idle(Sender: TObject; var Done: Boolean); begin Timer1.Enabled := True; end; procedure TForm1.Timer1Timer(Sender: TObject); begin form1.Close; (form1.Parent as Tform).close; end; 快试试吧
任 任豆豆 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #4 TApplicationEvents在additional组件中 Ttimer设interval为5*60*1000 你也可在ApplicationEvents1Message中再对消息具体进行判断和过滤处理
TApplicationEvents在additional组件中 Ttimer设interval为5*60*1000 你也可在ApplicationEvents1Message中再对消息具体进行判断和过滤处理
张 张无忌 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-28 #6 做一个无模式对话框,在这个Form上放一个TTimer,在 Form的事件里做一下判断就可以了...