为笔记本电脑开发自定义屏幕显示应用程序

发布于 2024-07-13 19:34:31 字数 293 浏览 7 评论 0原文

我很想为我的笔记本电脑创建一个自定义的屏幕显示应用程序,因为制造商提供的应用程序完全是垃圾。 我要编写一个应用程序来显示音量控制、屏幕亮度、无线天线状态等内容。 我不确定我需要知道什么信息才能开始创建这样的东西(用于抓取按键/按钮按下的界面、系统优先级、任何其他相关数据),并且想知道是否有人可以帮助我指出正确的方向。 如果可能的话我想用C#开发它。

例如,当我按住笔记本电脑键盘上的“Fn”键并按“F5”键时,音量会减小。 通过屏幕上的图形来直观地表示此操作,显示当前声音级别正在降低。 我想替换原生图形,因为我只是不喜欢它:D。

I would love to create a custom on-screen display app for my laptop, seeing as the manufacturer-supplied one is utter garbage. I'm out to write an app that will show things such as volume control, screen brightness, wireless antenna status and so forth. I'm not sure what info I'd need to know to begin creating something like this (interfaces for grabbing key/button presses, system priority, any other relevant data) and wondered if anyone could help point me in the right direction. If possible I'd like to develop it in C#.

For example, when I hold in the "Fn" key on my laptop keyboard and press the "F5" key, the volume is decreased. There is a visual representation of this action by way of an on-screen graphic that shows the current sound level being decreased. I want to replace the native graphic because, well, I just don't like it :D.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

菊凝晚露 2024-07-20 19:34:31

为此,我使用 AutoHotKey 。 编程语言/框架有点奇怪,但它非常强大,并且有很多免费可用的脚本可以做一些令人惊奇的事情(嗯,当你考虑这种语言时,真是太神奇了;-)。 Adam Pash(来自 LifeHacker.com)利用 AutoHotKey 做了很多出色的工作。

我没有对自定义图形做过任何事情,但这是我的音量控制代码的样子(它与 Win-Plus 和 Win-Minus 热键相关)。

#=::
    SoundSetWaveVolume, +5
    Gosub, osd
    Return

#-::
    SoundSetWaveVolume, -5
    Gosub, osd
    Return

;; onscreen display for volume control
osd:
    IfWinNotExist, volume
    {
        Progress, b1, volume:, , volume
    }
    WinSet, Transparent, 220, volume
    SoundGet, Volumelvl, wave, volume
    Transform, Volumelvl,  Round, %Volumelvl%
    Progress, %Volumelvl%, volume: %Volumelvl%`%
    SetTimer, osd_off, 1000
    Return

osd_off:
    Progress, off

I use AutoHotKey for this purpose. The programming language/framework is kind of oddball but it's very powerful and there are lots of freely available scripts out there that do amazing things (well, amazing when you consider the language ;-). Adam Pash (from LifeHacker.com) has done a lot of good work with AutoHotKey.

I haven't done anything with custom graphics but here's what my volume control code looks like (it's tied to Win-Plus and Win-Minus hotkeys).

#=::
    SoundSetWaveVolume, +5
    Gosub, osd
    Return

#-::
    SoundSetWaveVolume, -5
    Gosub, osd
    Return

;; onscreen display for volume control
osd:
    IfWinNotExist, volume
    {
        Progress, b1, volume:, , volume
    }
    WinSet, Transparent, 220, volume
    SoundGet, Volumelvl, wave, volume
    Transform, Volumelvl,  Round, %Volumelvl%
    Progress, %Volumelvl%, volume: %Volumelvl%`%
    SetTimer, osd_off, 1000
    Return

osd_off:
    Progress, off
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文