在桌面上显示时间:在MicroHelp Bar上显示时间

下面举例了在MDIMicrohelp棒右边显示时间它利用个包含有个单行
编辑Control控件sle_timePop-Up类型窗口w_popup用SLE显示时间
//定义MDI Frame例子变量
INTEGER OX,OY,OH,OW // OLD X,Y AND HEIGHT, WIDTH
W_POPUP LPOP // LOCAL POPUP WHICH TRAIPES ...
//w_MDI_frameOpen事件
eger wx,wy,wh,ww // workspace extents
ox=this.x
oy=this.y
oh=this.height
ow=this.width
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
open(lpop)
move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
show(lpop)
//w_MDI_frameResize事件
eger wx,wy,wh,ww
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
( handle (lpop) > 0 ) then
     move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
end
SetFocus(this)
//w_MDI_frame用户事件pbm_move
eger wx,wy,wh,ww
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
( handle (lpop) > 0 ) then
     move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
end
SetFocus(this)
//w_popupOpen事件
sle_time.weight = 300
Timer(5)
triggerevent(this,timer!)
//w_popupTimer事件
Time t
t=now
sle_time.hide ( ) //hide the sle
sle_time.text=space(len(sle_time.text))
sle_time.text=(hour(t))+":"+(Minute(t))+":"+(Second(t))
sle_time.show ( ) //re-show the sle
Tags: 

延伸阅读

最新评论

发表评论