| 操作系统 办公 实用知识 设计 开发 WEB开发 移动开发 数据库 软件工程 网管 安全 管理 信息化 答疑 渠道 |
在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
今日推荐
|
重点推荐
领军企业技术文库
+更多领军技术文库
最新专题
电子杂志订阅
| ||||||||