桌面图标嵌入功提示窗口钉在桌面上

By admin at 2017-11-16 • 1人收藏 • 1019人看过
//代码出处 http://bbs.aardio.com/forum.php?mod=viewthread&tid=9949
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=216;bottom=91;border="none";exmode="none";max=false;min=false;mode="popup";sysmenu=false;title=false)
winform.add()
/*}}*/

import web.layout;
var wbLayout = web.layout(winform);

namespace web.layout.behavior.closeBtn {
	onButtonClick = function (ltTarget,ltEle,reason,behaviorParams) {
		ltEle.getForm().close();
	}
}

import process;
wbLayout.sinking = {
	onHyperlinkClick = function (ltTarget,ltEle,reason,behaviorParams) {
		var path = ltEle.href; 
		if(path) process.execute(path);
		ltEle.getForm().close();
		return true;
	} 
}

wbLayout.html = /**
<body>
	<span .arrow></span><span .close></span>
	<div .content>
		<p><strong>aardio</strong></p>
		<p>网站/桌面软件快速开发工具</p>
		<a href="http://www.aardio.com">www.aardio.com</a>
	</div>
</body>
**/

wbLayout.css = /**
html { background: transparent }
body { outline: 5px glow #000; background: #eee; border-radius: 10px }
body > .content { margin: 50%% 16px; font: 12px "Microsoft Yahei","SimHei","Simsun"; line-height: 12px; }
body > .content p { margin: 8px 0; }

.arrow {
	position: absolute; left: 2px; top: 50%%; width: 7px; height: 14px;
	font: 14px Tahoma; color: #eee; content: "◆"; overflow: hidden;
}

.close {
	position: absolute; right: 14px; top: 14px; width: 16px; height: 16px;
	font: 13px Tahoma; color: #333; text-align: center; line-height: 16px;
	behavior: clickable close-btn; border-radius: 2px; content: "×";
}
.close:hover, .close:active { background: #fff #fff #f2f2f2 #f2f2f2; outline: 2px glow #666 }
.close:active { padding: 1px -1px -1px 1px; background: #f2f2f2 #f2f2f2 #fff #fff }
**/

/*
shell = com.CreateObject('Shell.Application');
shell.MiniMizeAll();
*/
SendMessageInt( ..win.find("Shell_TrayWnd") , 0x111/*_WM_COMMAND*/,  419, 0 );//显示桌面

import winex.key;
import winex.desktop
winex.key.click(winex.desktop.listview.hwnd,"F5" );//刷新桌面 

var idx;
var listview = winex.desktop.listview;
for(i=1;10;1){
	idx = listview.findItemEx("aardio");
	if(idx) break;
	..win.delay(200);
}
if ( ! idx) { return }

var rect = listview.getItemRect(idx);
winform.setPos(rect.right, (rect.top + rect.bottom - winform.height) / 2);
winform.show();
 
win.setOwner(winform.hwnd,listview.hwnd)
win.setForeground( winex.find( "<Progman>|<WorkerW>" ),);
winform.modifyStyleEx(, 0x8000000/*_WS_EX_NOACTIVATE*/);
winform.transparent(true);

win.loopMessage();

blob.png

2 个回复 | 最后更新于 2017-11-17
2017-11-17   #1
//代码出处 http://bbs.aardio.com/forum.php?mod=viewthread&tid=9949
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=216;bottom=91;border="none";exmode="none";max=false;min=false;mode="popup";sysmenu=false;title=false)
winform.add()
/*}}*/
 
import web.layout;
var wbLayout = web.layout(winform);
 
namespace web.layout.behavior.closeBtn {
    onButtonClick = function (ltTarget,ltEle,reason,behaviorParams) {
        ltEle.getForm().close();
    }
}
 
import process;
wbLayout.sinking = {
    onHyperlinkClick = function (ltTarget,ltEle,reason,behaviorParams) {
        var path = ltEle.href; 
        if(path) process.execute(path);
        ltEle.getForm().close();
        return true;
    } 
}
 
wbLayout.html = /**
<body>
    <span .arrow></span><span .close></span>
    <div .content>
        <p><strong>aardio</strong></p>
        <p>网站/桌面软件快速开发工具</p>
        <a href="http://www.aardio.com">www.aardio.com</a>
    </div>
</body>
**/
 
wbLayout.css = /**
html { background: transparent }
body { outline: 5px glow #000; background: #eee; border-radius: 10px }
body > .content { margin: 50%% 16px; font: 12px "Microsoft Yahei","SimHei","Simsun"; line-height: 12px; }
body > .content p { margin: 8px 0; }
 
.arrow {
    position: absolute; left: 2px; top: 50%%; width: 7px; height: 14px;
    font: 14px Tahoma; color: #eee; content: "◆"; overflow: hidden;
}
 
.close {
    position: absolute; right: 14px; top: 14px; width: 16px; height: 16px;
    font: 13px Tahoma; color: #333; text-align: center; line-height: 16px;
    behavior: clickable close-btn; border-radius: 2px; content: "×";
}
.close:hover, .close:active { background: #fff #fff #f2f2f2 #f2f2f2; outline: 2px glow #666 }
.close:active { padding: 1px -1px -1px 1px; background: #f2f2f2 #f2f2f2 #fff #fff }
**/
 
/*
shell = com.CreateObject('Shell.Application');
shell.MiniMizeAll();
*/
SendMessageInt( ..win.find("Shell_TrayWnd") , 0x111/*_WM_COMMAND*/,  419, 0 );//显示桌面
 
import winex.key;
import winex.desktop
winex.key.click(winex.desktop.listview.hwnd,"F5" );//刷新桌面 
 
var idx;
var listview = winex.desktop.listview;
for(i=1;10;1){
    idx = listview.findItemEx("aardio");
    if(idx) break;
    ..win.delay(200);
}
if ( ! idx) { return }
 
var rect = listview.getItemRect(idx);
winform.setPos(rect.right, (rect.top + rect.bottom - winform.height) / 2);
winform.show();
  
win.setOwner(winform.hwnd,listview.hwnd)
win.setForeground( winex.find( "<Progman>|<WorkerW>" ),);
winform.modifyStyleEx(, 0x8000000/*_WS_EX_NOACTIVATE*/);
winform.transparent(true);
 
win.loopMessage();


2017-11-17   #2
//代码出处 http://bbs.aardio.com/forum.php?mod=viewthread&tid=9949
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=216;bottom=91;border="none";exmode="none";max=false;min=false;mode="popup";sysmenu=false;title=false)
winform.add()
/*}}*/
 
import web.layout;
var wbLayout = web.layout(winform);
 
namespace web.layout.behavior.closeBtn {
    onButtonClick = function (ltTarget,ltEle,reason,behaviorParams) {
        ltEle.getForm().close();
    }
}
 
import process;
wbLayout.sinking = {
    onHyperlinkClick = function (ltTarget,ltEle,reason,behaviorParams) {
        var path = ltEle.href; 
        if(path) process.execute(path);
        ltEle.getForm().close();
        return true;
    } 
}
 
wbLayout.html = /**
<body>
    <span .arrow></span><span .close></span>
    <div .content>
        <p><strong>aardio</strong></p>
        <p>网站/桌面软件快速开发工具</p>
        <a href="http://www.aardio.com">www.aardio.com</a>
    </div>
</body>
**/
 
wbLayout.css = /**
html { background: transparent }
body { outline: 5px glow #000; background: #eee; border-radius: 10px }
body > .content { margin: 50%% 16px; font: 12px "Microsoft Yahei","SimHei","Simsun"; line-height: 12px; }
body > .content p { margin: 8px 0; }
 
.arrow {
    position: absolute; left: 2px; top: 50%%; width: 7px; height: 14px;
    font: 14px Tahoma; color: #eee; content: "◆"; overflow: hidden;
}
 
.close {
    position: absolute; right: 14px; top: 14px; width: 16px; height: 16px;
    font: 13px Tahoma; color: #333; text-align: center; line-height: 16px;
    behavior: clickable close-btn; border-radius: 2px; content: "×";
}
.close:hover, .close:active { background: #fff #fff #f2f2f2 #f2f2f2; outline: 2px glow #666 }
.close:active { padding: 1px -1px -1px 1px; background: #f2f2f2 #f2f2f2 #fff #fff }
**/
 
/*
shell = com.CreateObject('Shell.Application');
shell.MiniMizeAll();
*/
SendMessageInt( ..win.find("Shell_TrayWnd") , 0x111/*_WM_COMMAND*/,  419, 0 );//显示桌面
 
import winex.key;
import winex.desktop
winex.key.click(winex.desktop.listview.hwnd,"F5" );//刷新桌面 
 
var idx;
var listview = winex.desktop.listview;
for(i=1;10;1){
    idx = listview.findItemEx("aardio");
    if(idx) break;
    ..win.delay(200);
}
if ( ! idx) { return }
 
var rect = listview.getItemRect(idx);
winform.setPos(rect.right, (rect.top + rect.bottom - winform.height) / 2);
winform.show();
  
win.setOwner(winform.hwnd,listview.hwnd)
win.setForeground( winex.find( "<Progman>|<WorkerW>" ),);
winform.modifyStyleEx(, 0x8000000/*_WS_EX_NOACTIVATE*/);
winform.transparent(true);
 
win.loopMessage();


登录后方可回帖

登 录
信息栏
本站永久域名:HtmLayout.Cn
纯私人站,当笔记本用的,学到哪写到哪,目前正在学aardio+halcon机器视觉.
Sciter中文在线文档Sciter在线学习文档
本 站 主 站:Stm32cube中文网
Aardio 官方站:Aardio官方
Aardio最新功能:Aardio官方更新日志
aardio在线手册Aardio在线手册
C大Aardio论坛:Aar爱好者论坛
简码教程网:简码编程
AARDIO语言QQ群:70517368
赞助商:才仁机械
下载站:非凡软件站
Loading...