启用鼠标阴影的脚本?

发布于 2024-11-02 17:30:37 字数 353 浏览 3 评论 0原文

我发现有人在一些论坛上问这个问题,但没有解决方案。这是很多人都知道的一个小但恼人的美容问题。

某些全屏程序会禁用 Windows 中光标下的阴影。阴影通常会回来,但当没有回来时(例如程序没有正常关闭),鼠标会显示没有阴影,您必须手动将其启用。

我想做的解决方案是使用 .bat.vbs 来启用阴影,只是我还没有弄清楚如何。

我发现它是一个注册表值,并且还需要执行一些操作来“刷新”光标并使阴影出现。有人可以帮忙吗?

我想补充一点,我在 .bat.vbs 编写方面的经验非常少,所以如果您知道该怎么做以及如何做,请发布 怎么也。

I've found people asking this question on some forums, but no solutions. This is a small but annoying cosmetic problem many people know.

Some full screen programs disable the shadow under the cursor in Windows. The shadow usually comes back, but when is doesn't (for example the program didn't close normally) the mouse appears without shadow, and you have to go and manually enable it back.

The solution I'd like to do is a .bat or .vbs to enable the shadow, only I haven't figured how.

What I did find is that it's a registry value, and there is also something to do to "refresh" the cursor and make the shadow appear. Can anyone help?

I'd like to add that I have very small experience in .bat or .vbs writing, so if you know what to do and how, please post the how too.

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

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

发布评论

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

评论(2

她说她爱他 2024-11-09 17:30:37

使用API​​使其立即生效。

#include <Windows.h>

int main() {
    BOOL didSucceed = SystemParametersInfo(
        SPI_SETCURSORSHADOW,
        0,
        (PVOID) TRUE,
        SPIF_UPDATEINIFILE + SPIF_SENDCHANGE);

    return didSucceed ? EXIT_SUCCESS : EXIT_FAILURE;
}

Using the API makes it take effect immediately.

#include <Windows.h>

int main() {
    BOOL didSucceed = SystemParametersInfo(
        SPI_SETCURSORSHADOW,
        0,
        (PVOID) TRUE,
        SPIF_UPDATEINIFILE + SPIF_SENDCHANGE);

    return didSucceed ? EXIT_SUCCESS : EXIT_FAILURE;
}
感受沵的脚步 2024-11-09 17:30:37

它位于著名的(尚未记录:-)“UserPreferencesMask”注册表项中。
以下是一些提示:

第一个常规链接,其中包含有关此键的信息以及如何定义鼠标阴影设置:HKCU\Control Panel\Desktop\UserPreferencesMask

以及一个解释如何使用 VBSCript 进行编码的示例(这是另一个键,但原理是相同的): 设置 UserPreferencesMask 二进制注册表项

It's located in the famous (yet undocumented :-) "UserPreferencesMask" registry key.
Here are some pointers:

A first general link with information on this key, and how the mouse shadow setting is defined: HKCU\Control Panel\Desktop\UserPreferencesMask

And a sample that explain how to code it using VBSCript (it's another key, but the principle is the same): Set UserPreferencesMask Binary Registry Key

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