Hi I need to enable/disable Cleartype (or "Adjust the appearance and performance of Windows > Smooth edges of screen fonts") via cmd (or any script like VBS/JS) or from registry without log off or windows restart.
May be it's possible enable ClearType only for one application
Thanks
The modern way of scripting under Windows is using PowerShell. The following script requires version 2.0, which is available from Windows XP SP3:
If, for some reason, you can't use PowerShell, you'll need DynamicWrapperX in order to execute WinAPI functions in WSH. You will first need to register it on the target machine, then you could use this VBScript:
Both scripts accept one parameter,
0
means disable ClearType,1
means enable. No reboot is needed.Python version:
Here's a PowerShell way to do it:
You'll need to log off and back on for it to take effect.
The following works for me: Control Panel > System > Advanced system settings > Advanced > (Performance) Settings > Visual Effects > Select 'Custom' and uncheck 'Smooth edges of screen fonts'
Look at the stuff described in the following link:
http://www.vbforums.com/showthread.php?t=491091
Calling the API might trigger the system-wide update so you do not have to logoff/logon to see the change.
Of course, this is not limited to vb.net.
Just to add more options, I have the C# version, adding GetFontSmoothing to it.