如何为Windows构建SystemTray应用程序? [英] How to build a SystemTray app for Windows?

查看:88
本文介绍了如何为Windows构建SystemTray应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常在Linux系统上工作,但遇到一种情况,我需要编写一个客户端应用程序,该应用程序可以作为服务在Windows上运行.有人可以帮助我或指导我如何在Windows环境下构建MenuBar应用程序(例如Dropbox),该应用程序从操作系统启动开始,图标位于TaskBar中,然后单击该应用程序图标将显示一个菜单.

I usually work on a Linux system, but I have a situation where I need to write a client app which would run on windows as a serivce. Can someone help me or direct to, on how to build a MenuBar app ( for example like dropbox) for windows environment, which gets started on OS startup and the icon sits in the TaskBar and on clicking the app icon presents a menu.

我的脚本语言是python.谢谢.

My scripting language is python. Thanks.

推荐答案

您可以使用 pywin32(Python Windows扩展程序)模块.

Python 2示例代码

类似问题

要使其在启动时运行,您可能会弄乱服务,但实际上在用户启动文件夹"中安装指向exe的链接要容易得多.

To make it run at startup you could mess around with services but it's actually much easier to install a link to the exe in the users "Startup Folder".

Windows 7和Vista

c:\ Users \ [用户名] \ AppData \ Roaming \ Microsoft \ Windows \开始菜单\ Programs \ Startup

c:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Windows XP

c:\ Documents and Settings \ [用户名] \开始"菜单\程序" \启动"

c:\Documents and Settings\[username]\Start Menu\Programs\Startup

这篇关于如何为Windows构建SystemTray应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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