如何开始使用 Windows 7 小工具 [英] How to get started with Windows 7 gadgets

查看:18
本文介绍了如何开始使用 Windows 7 小工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从未为 Vista 或 7 编写过小工具,但我想尝试制作一个.但是我从哪里开始呢?我试图在 google 和 msdn 上搜索,但我没有找到任何有用的东西.要么是非常非常古老的东西(Vista beta 的东西),要么已经制作了小工具,要么是 Vista 和 7 中的小工具之间的差异.但这对我没有帮助,因为我一开始不知道如何制作小工具......我什至没有设法找出它们是用什么写的......

I have never programmed a gadget for Vista or Seven, but I would like to try to make one. But where do I start? I have tried to search around on google and msdn, but I haven't managed to find anything useful. Either very, very old stuff (Vista beta stuff), already made gadgets or differences between gadgets in Vista and Seven. But that doesn't help me, since I don't have a clue how to make a gadget in the first place... I haven't even managed to find out what they are written in...

那么,任何人都可以帮助我开始吗?

So, could anyone help me out with a kick start?

  • 我从哪里开始?
  • 我需要知道什么?
  • 它们是用什么写的?
  • 它们是如何打包"的?

换句话说,我如何从使用 Visual Studio 的全新 Windows 7 安装到可以安装并放在我的 Windows 7 桌面上的工作小工具.

In other words, how do I get from a clean install of Windows 7 with Visual Studio to a working Gadget that I can install and put on my Windows 7 desktop.

推荐答案

这是一篇关于 Vista 小工具.关于 7 小工具和更改的一些初步文档.我认为唯一的主要变化是小工具不再驻留在侧边栏中,因此停靠/取消停靠事件"现在是向后兼容的组件,确实不应该使用.

Here's an MSDN article on Vista Gadgets. Some preliminary documentation on 7 gadgets, and changes. I think the only major changes are that Gadgets don't reside in the Sidebar anymore, and as such "dock/undock events" are now backwards-compatibility cludges that really shouldn't be used.

开始的最佳方式可能是调整现有的小工具.上面的链接中有一个示例小工具,或者您可以自行选择其他小工具.

Best way to get started is probably to just tweak an existing gadget. There's an example gadget in the above link, or you could pick a different one out on your own.

小工具是用 HTML、CSS 和一些 IE 脚本语言(通常是 Javascript,但我相信 VBScript 也可以)编写的.对于真正花哨的东西,您可能需要创建一个 ActiveX 对象,因此了解 COM 的 C#/C++ 可能很有用.

Gadgets are written in HTML, CSS, and some IE scripting language (generally Javascript, but I believe VBScript also works). For really fancy things you might need to create an ActiveX object, so C#/C++ for COM could be useful to know.

小工具被打包为.gadget"文件,这些文件只是重命名的 Zip 档案,在其顶层包含一个小工具清单 (gadget.xml).

Gadgets are packaged as ".gadget" files, which are just renamed Zip archives that contain a gadget manifest (gadget.xml) in their top level.

这篇关于如何开始使用 Windows 7 小工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆