作用:控制应用系统多少秒未操作,弹出一响应窗口,倒计时多少秒退出系统
1.开发工具powerbuilder
2.定义两个全局变量as_idle,as_show
3.创建一个响应窗口w_sysexit_response,该窗口上放置三个控件:singlelineedit sle_1 ,statictext st_1 ,commandbutton cb_1
定义实例变量 integer ll_i
open事件底稿(代码):
ll_i=as_show
timer(1)
timer事件底稿:
ll_i --
st_1.text=string(ll_i)
if ll_i=0 then halt close
st_1 控件constructor底稿:
this.text=string(as_show)
sle_1控件constructor底稿:
this.text="系统将在"+string(as_show)+"秒后退出"
cb_1控件点击事件底稿:
close(parent)
4.应用系统application中的open事件底稿写上:
全局变量as_idle,as_show分别赋具体数值
idle(as_idle)
5.应用系统application中的idle事件底稿:
open(w_sysexit_response)
阅读(666) | 评论(0) | 转发(0) |