[AHK] Windows 10上用热键 隐藏/显示桌面图标

news/2024/11/18 14:00:16/

简单点,再简单点,alt+q 隐藏、显示桌面图标!

!q::
HideOrShowDesktopIcons()
returnHideOrShowDesktopIcons()
{ControlGet, class, Hwnd,, SysListView321, ahk_class ProgmanIf class =ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerWIf DllCall("IsWindowVisible", UInt,class)WinHide, ahk_id %class%ElseWinShow, ahk_id %class%
}
;双击桌面右上角显示隐藏桌面图标#Persistent
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
;~ 桌面Progman|WorkerW
GroupAdd, Desktop, ahk_class ExploreWClass
GroupAdd, Desktop, ahk_class WorkerW
WaitTime := DllCall("GetDoubleClickTime")/1000
;屏幕左上
x1:=0
y1:=0
;任务栏高度
WinGetPos,,,, h,ahk_class Shell_TrayWnd
;屏幕右下
x2:=A_ScreenWidth
y2:=A_ScreenHeight-h
OutputDebug %x2%,%y2%
#IfWinActive, ahk_group Desktop
~LButton::
KeyWait,LButton
KeyWait, LButton, d T %WaitTime%+200
If ! Errorlevel
{MouseGetPos,x,yOutputDebug %x%-%y%;~ if (x<x1+10 and y<y1+10 )  ;屏幕左上角10*10见方。;~ {	;~ OutputDebug 左上角;~ HideOrShowDesktopIcons();~ }if (x>x2-10 and y<y1+10 )  ;屏幕右上角10*10见方。{	OutputDebug 右上角HideOrShowDesktopIcons()}else if (x<x1+10){OutputDebug 左边;~ Run notepad}else if (y<y1+10){OutputDebug 上边;~ Run notepad}else if(x>x2-10){OutputDebug 右边;~ run calc}else if(y>y2-10){OutputDebug 下边;~ run calc}else{OutputDebug 其它ToolTip %x%-%y%Sleep,1000ToolTip}
}
returnHideOrShowDesktopIcons()
{ControlGet, class, Hwnd,, SysListView321, ahk_class ProgmanIf class =ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerWIf DllCall("IsWindowVisible", UInt,class)WinHide, ahk_id %class%ElseWinShow, ahk_id %class%
}

以下可以不看了。

 

How to Hide All Desktop Icons in Windows 10

Your Desktop is a special folder which shows your background wallpaper that you have chosen and your files, folders, documents, shortcuts and all such items you have stored. It appears every time you sign in to Windows. Today, we will see how to quickly hide your desktop contents.

RECOMMENDED: Click here to fix Windows errors and optimize system performance


Tip: In earlier Windows versions, the Desktop had important icons enabled by default - This PC, Network, Control Panel, and your User files folder. They were all visible by default. However, in modern Windows versions, Microsoft made most of these icons hidden. In Windows 10, only the Recycle Bin is present on the Desktop by default. Also, the Windows 10 Start Menu does not have links to these icons either. You can enable classic Desktop icons as follows:

 

Enable Desktop Icons in Windows 10

To hide all desktop icons in Windows 10, you can do the following.

  1. Minimize all open windows and apps. You can use Win + D or Win + M shortcut keys. Alternatively, you can right-click the taskbar and select "Show the desktop" from the context menu or left click the far end of the taskbar.Taskbar Context Menu Show DesktopTip: See What is the difference between Win + D (Show Desktop) and Win + M (Minimize All) keyboard shortcuts in Windows
  2. Right click the empty space on your Desktop and select View - Show Desktop Icons. This command will toggle the visibility of your Desktop icons.Windows 10 Hide Desktop Icons

This is pretty simple.

Depending on your production environment, it may be necessary to disable Desktop icons for all users in your Active Directory/domain, a specific user on your computer or for all users of your PC. In this case, you can use a special Group Policy item or a Registry tweak. Let's review them.

If you are running Windows 10 Pro, Enterprise, or Education edition, you can use the Local Group Policy Editor app.

Hide All Desktop Icons in Windows 10 with Group Policy

  1. Press Win + R keys together on your keyboard and type:
    gpedit.msc

    Press Enter.Windows 10 run gpedit

  2. Group Policy Editor will open. Go to User Configuration\Administrative Templates\Desktop. Enable the policy option Hide and disable all items on the desktop as shown below.Windows 10 Hide Desktop Icons Gp

Hide All Desktop Icons in Windows 10 with a Registry tweak

  1. Open Registry Editor.
  2. Go to the following Registry key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

    Tip: See how to jump to the desired Registry key with one click.

    If you do not have such a key, then just create it.

  3. Here, create a new 32-bit DWORD value NoDesktopNote: Even if you are running 64-bit Windows, you still need to use a 32-bit DWORD as the value type.
    Set it to 1 to hide desktop icons.Windows 10 Hide Desktop Icons Tweak
  4. To make the changes done by the Registry tweak take effect, you need to sign out and sign in again to your user account.

Later, you can delete the NoDesktop value to allow the user to use Desktop icons.

To apply this option for all users, ensure that you are signed in as Administrator before proceeding.

Then, go to the following Registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Create the same value here, NoDesktop as described above.


http://www.ppmy.cn/news/851881.html

相关文章

win10/win11快速隐藏/显示桌面图标快捷方式

使用windows系统的时候&#xff0c;桌面有时会变得比较杂乱&#xff0c;想要随时随地很方便的隐藏和显示桌面图标还不是不是一件容易的事情&#xff0c;这里介绍了一个代码&#xff0c;可以很方便地设置快捷方式。   快捷键altq隐藏/显示图标&#xff0c;代码如下&#xff1a…

no main manifest attribute, in schoolspringboot-0.0.1-SNAPSHOT.jar

no main manifest attribute, in schoolspringboot-0.0.1-SNAPSHOT.jar 部署springboot项目jar包报错。解决方案&#xff1a; pom文件添加 <build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot…

Dijkstra算法模板求有向图最短路c++实现

题目如下 给定一个 n个点 m 条边的有向图&#xff0c;图中可能存在重边和自环&#xff0c;所有边权均为非负值。 请你求出 11 号点到 n 号点的最短距离&#xff0c;如果无法从 1 号点走到 n 号点&#xff0c;则输出 −1。 输入格式 第一行包含整数 n 和 m。 接下来 m 行每…

作为技术人,如何突破自己的技术瓶颈,从而提高自己的核心竞争力

一、前言 不知不觉间&#xff0c;迎来了2021年的第一天。过去的2020年注定是一个不平凡一年&#xff0c;疫情来得太快就像龙卷风&#xff0c;短短数月就阻断了全世界范围内无数人与人之间的物理连接。这一年&#xff0c;我们戴了一年口罩&#xff1b;这一年&#xff0c;哪些逆…

人工智能有哪些突破

摘要&#xff1a; 本文讲述了在过去一年里人工智能在哪些方面获得了哪些突破。 AI子领域包括&#xff1a;机器学习&#xff08;ML&#xff09;&#xff0c;自然语言处理&#xff08;NLP&#xff09;&#xff0c;深度学习&#xff08;DL&#xff09;&#xff0c;机器人流程自动…

百度地图突破19级缩放限制解决方案

百度地图默认最大缩放级别为19级&#xff0c;但在某些场景中需要结合自定义贴图实现更高级别的视图 通过下面提供的两种方式就能自定义最大最小缩放层级 缩放到20级的效果图 方法一&#xff1a;通过自定义瓦片迂回方式设置 提示&#xff1a;请使用自己申请的《百度地图key》替…

自我突破

业精于勤&#xff0c;荒于嬉 —— 韩愈《进学解》 随着时间都积累&#xff0c;当自己对工作技能越来越熟练时&#xff0c;难免会陷入 舒适区 &#xff0c;此时就如同人生都 岔路口&#xff0c;突破过去就进入到 新的阶段 &#xff0c;不能则技术水平从此 止步不前。我笃信一个观…

python爬虫进阶,突破反脚本机制(反爬机制)

前言 相信大家在做爬虫或者自动化脚本时或多或少的都能遇到反爬机制&#xff08;或者说反脚本机制&#xff09;&#xff0c;最常见的反脚本机制都是在登录时进行验证&#xff0c;据本人大量实战&#xff08;帮粉丝写脚本&#xff09;发现&#xff0c;基本上只要有点水平的网站…