在MicroHelp Bar上显示时间
【打印文章】
下面示例了在MDI的Microhelp棒的右边显示时间。它利用一个包含有一个单行
编辑控件sle_time的Pop-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_frame的Open事件
integer 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_frame的Resize事件
integer wx,wy,wh,ww
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
if ( handle (lpop) > 0 ) then
move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
end if
SetFocus(this)
//w_MDI_frame的用户事件pbm_move
integer wx,wy,wh,ww
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
if ( handle (lpop) > 0 ) then
move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
end if
SetFocus(this)
//w_popup的Open事件
sle_time.weight = 300
Timer(5)
triggerevent(this,timer!)
//w_popup的Timer事件
Time t
t=now()
sle_time.hide ( ) //hide the sle
sle_time.text=space(len(sle_time.text))
sle_time.text=string(hour(t))+":"+string(Minute(t))+":"+string(Second(t))
sle_time.show ( ) //re-show the sle
编辑控件sle_time的Pop-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_frame的Open事件
integer 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_frame的Resize事件
integer wx,wy,wh,ww
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
if ( handle (lpop) > 0 ) then
move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
end if
SetFocus(this)
//w_MDI_frame的用户事件pbm_move
integer wx,wy,wh,ww
wx=this.workspacex ( )
wy=this.workspacey ( )
wh=this.workspaceheight ( )
ww=this.workspacewidth ( )
if ( handle (lpop) > 0 ) then
move(lpop,wx+ww - lpop.width - 15,wy+wh - lpop.height - 22)
end if
SetFocus(this)
//w_popup的Open事件
sle_time.weight = 300
Timer(5)
triggerevent(this,timer!)
//w_popup的Timer事件
Time t
t=now()
sle_time.hide ( ) //hide the sle
sle_time.text=space(len(sle_time.text))
sle_time.text=string(hour(t))+":"+string(Minute(t))+":"+string(Second(t))
sle_time.show ( ) //re-show the sle
本栏文章均来自于互联网,版权归原作者和各发布网站所有,本站收集这些文章仅供学习参考之用。任何人都不能将这些文章用于商业或者其他目的。( Pfan.cn )
【编程爱好者论坛】