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

By admin at 2017-11-16 • 1人收藏 • 2061人看过
//代码出处 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();


登录后方可回帖

登 录
信息栏
 私人小站

本站域名

ChengXu.XYZ

投诉联系:  popdes@126.com



快速上位机开发学习,本站主要记录了学习过程中遇到的问题和解决办法及上位机代码分享

这里主要专注于学习交流和经验分享.
纯私人站,当笔记本用的,学到哪写到哪.
如果侵权,联系 Popdes@126.com

友情链接
Aardio官方
Aardio资源网


才仁机械


网站地图SiteMap

Loading...