[英]How to write Windows 7 gadget in C#?
How can I use C# to write a gadget in Windows 7? 如何使用C#在Windows 7中编写小工具?
Is it possible? 可能吗?
http://www.codeproject.com/KB/gadgets/CPRepWindowsGadget.aspx http://www.codeproject.com/KB/gadgets/CPRepWindowsGadget.aspx
And a search on codeproject shows even more: http://www.codeproject.com/search.aspx?q=gadget&sbo=kw 对codeproject的搜索显示更多: http : //www.codeproject.com/search.aspx? q = gadget&sbo = kw
Is Sidebar gadgets what you are looking for? Sidebar小工具是您要找的吗?
Assuming that "Windows Sidebar Gadgets" are being talked about, this is not possible to do directly . 假设正在谈论“Windows边栏小工具”, 这是不可能直接做的 。 However there are some work-abouts (none of which are supported by Microsoft):
但是有一些工作(微软不支持):
Use Silverlight . 使用Silverlight 。 However, as I recall, the background can't be "painted transparent" and this will not work with a 64-bit IE (the IE running gadgets isn't always 32-bit by default) as there is no 64-bit Silverlight.
然而,我记得,背景不能“画透明”,这将不与64位IE 工作 (IE的运行的小工具不总是32位默认情况下),因为没有64位的Silverlight 。 This is the same problem plaguing sidebar gadgets that use Flash.
这是困扰使用Flash的侧边栏小工具的同样问题。 (Like Pandora, one could require avid users to launch the 32-bit version of sidebar.exe).
(像Pandora一样,可能需要狂热的用户启动32位版本的sidebar.exe)。
Wrap the gadget window. 包裹小工具窗口。 I started work on a project like this that allowed WPF (in a separate process) to "overlay" the gadget window -- started via COM.
我开始研究这样一个项目,允许WPF(在一个单独的过程中)“覆盖”小工具窗口 - 通过COM启动。 Avoids 32/64-bit issues (actually, doesn't matter since it's in a separate process and is CLR, not Silverlight).
避免32/64位问题(实际上,无关紧要,因为它在一个单独的进程中并且是CLR,而不是Silverlight)。 Some issues with default gadget border, sizing, properties, etc. Concept work only.
默认小工具边框,大小调整,属性等的一些问题。概念仅起作用。
Use an embedded HTA to launch a 32-bit IE and grab that handle (can then use/embedd Silverlight if launched the 32-bit version). 使用嵌入式HTA启动32位IE并获取该句柄(如果启动32位版本,则可以使用/嵌入Silverlight)。 I didn't have success with this, but it "should work".
我没有成功,但它“应该工作”。
Use a converter like Script# -- write in C#, "compile" to JavaScript. 使用像Script这样的转换器 - 用C#编写,“编译”到JavaScript。
Happy coding. 快乐的编码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.