AAuto - 天气预报


import win.ui;
/*DSG{{*/
winform = ..win.form( bottom=433;parent=...;text="AAuto Form";border="none";exmode="toolwindow";mode="popup";right=487;topmost=1 )
winform.add(  )
/*}}*/
//启用分层窗口
winform.modifyStyleEx(,0x80000/*_WS_EX_LAYERED*/)
import web.layout;
wbLayout = web.layout(winform);
wbLayout.html =/***
<div id="say"><p class="text"> <iframe name="weather_inc" src="http://tianqi.xixik.com/cframe/7" style="border:solid 1px #7ec8ea" width="225" height="90" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</p></div>
<menu.context id="menuId"> 
    <li>退出</li>  
</menu>
***/
wbLayout.css = /**
html {   
    background-color:transparent; /*网页背景透明*/
    context-menu:selector(menu#menuId);
} 
#img{   
    position:absolute; 
    //left:-40px;     
   top:48px; 
   border-color:#DDD #777 #777 #DDD;
}
#say{   
    position:absolute; 
    left:120px;     
    width:80px; 
    height:87px;    
    background: url(<div id="say"><p class="text"> <iframe name="weather_inc" src="http://tianqi.xixik.com/cframe/7" style="border:solid 1px #7ec8ea" width="225" height="90" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</p></div>) repeat-y;
}
.text{
    margin: 1px;     
    text-align:center;  
    padding:5px 24px;   
    width:35px; 
    height:30px; 
}
**/ 
wbLayout.documentElement.attachEventHandler( 
    //鼠标按下拖动触发下面的函数
    onMouseMove = function (ltTarget,ltEle,x,y,ltMouseParams) {
        if( ltMouseParams.button_state == 1/*_HL_MAIN_MOUSE_BUTTON*/ ){
            var wx,wy = winform.getPos();
            wx = wx + (x - winform.downPos.x)
            wy = wy + (y - winform.downPos.y)
            ltTarget.getForm().setPos( wx,wy)
            return true;
        }
    } 
    
    //鼠标按下触发下面的函数
    onMouseDown = function (ltTarget,ltEle,x,y,ltMouseParams) {     
        winform.capture = true;
        winform.downPos = { x = x ;y = y}
    }
) 
//右键菜单触发下面的函数
wbLayout.onMenuItemClick = function (ltTarget,ltEle,reason,behaviorParams) {
   if( ltTarget.innerText == "退出" ){
       winform.close();
   }
}
winform.show() 
win.loopMessage(); 


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值