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();
![](https://img-my.csdn.net/uploads/201303/01/1362112683_7338.jpg)