从&QUOT如何切换/开关Windows任务栏;显示"到"自动隐​​藏] (反之亦然)? [英] How to toggle/switch Windows taskbar from "show" to "auto-hide" (and vice-versa)?

查看:207
本文介绍了从&QUOT如何切换/开关Windows任务栏;显示"到"自动隐​​藏] (反之亦然)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我想要做简单的切换程序(将被映射到一些键盘快捷键),在正常模式(如自动隐藏,相反,要正常显示模式)设置任务栏自动隐藏模式,如果

Basically I want to make simple toggle program (that will be mapped to some keyboard shortcut) that set taskbar to auto-hide mode if in normal mode (and conversely, to normal show mode if in auto-hide).

你知道如何实现它在C#中? (或Win32的C ++,但任何将真正做到这一点是好的。)

Do You know how to implement it in C#? (or Win32 C++, but anything that will actually do it is fine.)

感谢。希望我已经说清楚了。

Thanks. Hope I've made myself clear.

-

我真的不希望任何全屏幕应用程序,将任务栏重叠,只有窗户的程序,切换显示模式和退出。我从自动隐藏切换到普通视图定期,想简化它。 (使用Win7的。)

I don't really want any full screen app that will overlap taskbar, only windowless program that toggles show mode and quit. I switch from auto-hide to normal view on regular basis and want to simplify it. (Using Win7.)

-

编辑。例如:

#include <windows.h>

int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
    SetWindowPos(FindWindow(L"Shell_traywnd", NULL ), 0, 0, 0, 0, 0, 0x40);
}

不会做的伎俩,那只能说明任务栏上,这已经是可见=真实的,但不是从自动隐藏切换/。 (同样适用于0x80的。)

will not do the trick, it only shows taskbar, which is already visible=true, but not switch it to/from auto-hide. (Same applies for 0x80.)

推荐答案

任务栏是一个appbar,你可以使用的 SHAppBarMessage

The taskbar is a appbar and you can control it with SHAppBarMessage

这篇关于从&QUOT如何切换/开关Windows任务栏;显示&QUOT;到&QUOT;自动隐​​藏] (反之亦然)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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