一种全新的软件界面设计方法[1]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 aweay 的 blog

一种全新的软件界面设计方法

撰文:aweay

你可转载,拷贝,但必须加入作者署名aweay,如果用于商业目的,必须经过作者同意。

下载实例代码

关键字:com myspy ie setuihanlder icustomdoc idochostuihandler getexternal

前言

作者在解决各种问题的时候喜欢首先使用c++ builder来尝试,这篇文章也是这样,但这并不影响其他开发工具的使用者阅读,因为这都是微软的开发技术,选择什么工具并不重要,我们理解了他的原理可以使用任何工具实现同样的功能。

正文

使用过vc.net的朋友可能知道,在vc.net中全新提供了一种基于web的界面设计方法,不过可能真正用到的人很少,至少我在国内的软件中没有看到过这样的界面设计方法。当初使用vc.net的时候就希望bcb的下个版本可以加入这样灵活的界面设计方法,但是到现在还没有等到,我想也不能一直这样等下去,于是就自己研究其中的实现方法,终于让我研究出来。这篇文章就是讨论这样方法,以及在软件设计设计中的可行性。

说了这么多,可能还有朋友不知道这样的界面到底有什么不同,有什么优点呢?如果你也有同样的好奇感的话,请你继续看下去。

windows2000下,大家经常使用控制面板/添加、卸载软件的对话框就是基于这样的界面(xp下暂时不清楚),我不说出来可能很少有人知道-那个对话框整个就是个网页?什么你不相信?如果是网页为什么能和本地的计算机程序交互?为什么不能选择网页里面的文字?为什么不能弹出右键菜单?如果是网页,那它的html代码在那里?

为了证明上面的说法,我们需要一些特殊的软件,这个软件就是作者写的myspy,可以到作者的站点(http://siney.yeah.net)免费下载使用,我们可以从myspy的界面中看到添加/删除程序的对话框是个internet explorer_server,这说明它是个网页,

myspyweb页面还可以看到这个页面的地址是:res://sp3res.dll/default.hta,

近一步使用myspy得到这个网页的代码(不能直接右键获取代码),部分如下:

<html xmlns:ctls><head><title id=arp>添加/删除程序</title>

<meta http-equiv=content-type content="text/html; charset=gb2312"><base href=res://appwiz.cpl/><link href="arp.css" type=text/css rel=stylesheet>

<style>>ctls\:places { behavior: url(places.htc); }ctls\:listbox { behavior: url(listbox.htc); }ctls\:accel { behavior: url(accel.htc); }.placesbar {background-color:threedshadow}.hide {display:none}.nonclientbackground {                          background-color: buttonface;}.header {                                       padding-bottom: 5px;vertical-align: text-top; }.groupimage {                                   margin-right: 5px;}.groupdesc {padding-left: 1em;padding-right: 1em;}.appnamerow {}.appimagetd {width: 20px; padding: '4px 2px 2px 2px';}.infopane {                                     padding-top:4px;                            vertical-align: top;}.proplabel {width: 7em;padding-top: 2px;padding-bottom: 2px;padding-right: 3px;text-align: right;}.propvalue {width: 6em;text-align: right;padding-right: 7px;}.addproplabel {padding-top: 2px;padding-bottom: 2px;padding-right: 3px;text-align: right;}.addpropvalue {width: 13em;text-align: right;padding-right: 7px;}.buttondescpane {                               padding-top: 5px;                           padding-bottom: 7px;padding-right: 5px;}.buttonpane {                                   width: 15em;                                padding: 5px;                               text-align: right;}.fakeanchor {cursor:hand;}#idclientcatname {font-weight: bold;padding-bottom: 1ex;}.disabled {color: graytext;}#idtblextendedprops.focus {color: highlighttext;}</style>

本文关键:一种全新的软件界面设计方法
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top