简体   繁体   English

如何在C#中编写Windows 7小工具?

[英]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? 可能吗?

Is Sidebar gadgets what you are looking for? Sidebar小工具是您要找的吗?

Have a look at this Silverlight trick! 看看这个Silverlight技巧吧!

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): 但是有一些工作(微软不支持):

  1. 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)。

  2. 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. 默认小工具边框,大小调整,属性等的一些问题。概念仅起作用。

  3. 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". 我没有成功,但它“应该工作”。

  4. Use a converter like Script# -- write in C#, "compile" to JavaScript. 使用像Script这样的转换器 - 用C#编写,“编译”到JavaScript。

Happy coding. 快乐的编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在我的 c# 程序中使用 windows 小工具“connectionChanged”事件 - using windows gadget “connectionChanged” event in my c# program 使用SOAP,Javascript,C#,Webservices,jQuery的Sharepoint 2007 List的Windows Gadget - Windows Gadget for Sharepoint 2007 List using SOAP, Javascript, C#, Webservices, jQuery 如何使用C ++或C#为Windows Vista编写启动程序 - How to write a launching program in C++ or C# for Windows Vista 使用C#在任务栏中设置时钟小工具 - Clock Gadget in taskbar using C# 如何创建,读取和编写XML C#Windows窗体? - How to create, read and write XML C# windows forms? 如何在c#windows phone 8.1应用程序中写入excel文件? - how to write into the excel file in c# windows phone 8.1 application? 如何在C#Windows Form应用程序中使用Console.write() - How Console.write() in C# Windows Form Application 如何使用C#在Windows Server 2008中写入事件日志? - How to write to eventlog in Windows Server 2008 using C#? 如何使用c#windows窗体中的***在文本框中写入密码? - how to write a password in a textbox with *** in c# windows forms? 如何免费编写,编译和运行C#(在Windows中) - How to write, compile and run C# for free (in Windows)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM