怎樣不重啟設定字型邊緣平滑立即生效! 以下注冊表匯入後不能立即生效。。...

weixin_33912246發表於2019-01-08

Windows Registry Editor Version 5.00
;                            視覺設定
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects]
"VisualFXSetting"=dword:00000000

 

以下兩種辦法重新整理也無法立即生效。。但是手動設定能立即生效。。。由於以前做系統時把這個給去了 現在發現顯示字型邊緣模糊有鋸齒。。。十分難堪。。。特此尋求解決方法。。
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")

Do 
        ProcessClose("explorer.exe")
Until Not ProcessExists("explorer.exe")
Run("gpupdate /force","",@SW_HIDE)

#Include <WinAPI.au3>
WinActivate ("[CLASS:CabinetWClass]")
_WinAPI_PostMessage(ControlGetHandle("[CLASS:CabinetWClass]", "", "SysListView321"),256,116,0); 重新整理我的電腦
_WinAPI_PostMessage(ControlGetHandle("[CLASSrogman]", "", "SysListView321"),256,116,0);重新整理桌面


Func _Update_Explorer()
Local $bOld = Opt("WinSearchChildren", True)
Local $a = WinList("[CLASS:SHELLDLL_DefView]")
For $i = 0 To UBound($a) - 1
DllCall("user32.dll", "long", "SendMessage", "hwnd", $a[$i][1], "int", 0x111, "int", 28931, "int", 0)
Next
Opt("WinSearchChildren", $bOld)
EndFunc;==>_Update_Explorer

DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0) 


1、最有效的: 
結束explorer.exe,缺點時資源管理器被關,有些視窗被關,出現無工作列桌面狀態,雖然可以生效,但不推薦。 

[ Copy ] [ Run ] [ Save ]
Do
ProcessClose("explorer.exe") 
Until Not ProcessExists("explorer.exe")

2、呼叫SendMessageTimeout。效果不理想。

[ Copy ] [ Run ] [ Save ]
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult") 

3、呼叫組策略重新整理設定工具,測試無效

[ Copy ] [ Run ] [ Save ]
Run("gpupdate /force",@SystemDir)

4、又一重新整理登錄檔的API,非常強捍。效果不錯

[ Copy ] [ Run ] [ Save ]
DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)

5、重新整理桌面
[ Copy ] [ Run ] [ Save ]
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters

6chinanewxp的函式,可以重新整理登錄檔改檔案圖示後即時生效。

[ Copy ] [ Run ] [ Save ]

MyUpdateREG()

Func MyUpdateREG()
Global Const $HWND_BROADCAST=0xFFFF
Global Const $WM_SETTINGCHANGE=0x1A
DLLCall("user32.dll","int","SendMessage","hwnd",$HWND_BROADCAST,"int",$WM_SETTINGCHANGE,"int","", "int", "")
EndFunc

 

測試了一下,直接用API搞定:
DllCall('USER32.DLL','dword','SystemParametersInfo','dword',75,'dword',1,'dword',2,'dword',0x1) 
留字備用!!!!

 

相關文章