72 lines
1.2 KiB
Plaintext
72 lines
1.2 KiB
Plaintext
//透明 3D
|
|
import win.ui;
|
|
/*DSG{{*/
|
|
var winform = win.form(text="WebView2 - 透明3D";right=1112;bottom=771;border="none")
|
|
winform.add(
|
|
static={cls="static";text="Static";left=523;top=334;right=1054;bottom=699;transparent=1;z=1}
|
|
)
|
|
/*}}*/
|
|
|
|
import console
|
|
import web.form;
|
|
var wb = web.form(winform);
|
|
|
|
|
|
//窗口透明
|
|
winform.transparent(128,0xFFFFFFFF)
|
|
//winform.transparent(true)
|
|
|
|
//webView2 控件透明
|
|
//wb.defaultBackgroundColor = 0x00000000;
|
|
|
|
wb.go("/index.aardio",{str="IMG_1199.jpg"})
|
|
|
|
//var ele = wb.document.getElementsByClassName('sp-wrap');
|
|
|
|
//console.log(ele.innerHTML)
|
|
|
|
//wb.waitEle("body")
|
|
winform.show()
|
|
wb.wait()
|
|
|
|
|
|
var js = /**
|
|
document.body.style.backgroundColor = 'transparent';
|
|
**/
|
|
wb.doScript(js, )
|
|
|
|
|
|
wb.showMenu = function(x,y,id,ele){
|
|
/*定义此事件函数则禁用默认的右键弹出菜单*/
|
|
select(id) {
|
|
case 0/*_CONTEXT_MENU_DEFAULT */ {
|
|
|
|
}
|
|
case 1/*_CONTEXT_MENU_IMAGE*/ {
|
|
|
|
}
|
|
case 2/*_CONTEXT_MENU_CONTROL*/ {
|
|
|
|
}
|
|
case 4/*_CONTEXT_MENU_TEXTSELECT */ {
|
|
|
|
}
|
|
case 5/*_CONTEXT_MENU_ANCHOR*/ {
|
|
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|
|
wb.attach(
|
|
function(event){
|
|
if(event.button = 2){
|
|
wb._form.hitClose()
|
|
}
|
|
}
|
|
,"onmouseup",/*也可输入getEle()所需参数,省略表示doc*/
|
|
)
|
|
|
|
|
|
win.loopMessage(); |