mIRC Homepage
Posted By: Chessnut Disabling font smoothing - 09/09/10 03:37 PM
I've been having problems trying to enable and disable font smoothing through mIRC without having to write a dll. I've tried a ridiculous number of methods to turn it off, including:

Code:
.comopen excel Excel.Application 
var %call CALL("user32","SystemParametersInfo","AJJJJ", 75,0,0,1) 
noop $com(excel,executeexcel4macro,3,bstr,%call) 
comclose excel


Code:
//run rundll32.exe user32.dll,SystemParametersInfo 75,0,0,1


I've also tried updating these registry values to 0:

HKEY_CURRENT_USER\Control Panel\Desktop\FontSmoothing
HKEY_CURRENT_USER\Control Panel\Desktop\FontSmoothingType

However, this only works when windows is restarted so windows needs to be informed of the change. To achieve this, I have tried:

Code:
//run rundll32.exe user32.dll,UpdatePerUserSystemParameters


Code:
//run rundll32.exe shell32.dll,SHChangeNotify 1,0,0,0


and many other combinations besides, none of which work. I realise I can quite easily write a dll to do this, but it seems like overkill for a tiny feature. If anyone has any other suggestions, I would be very grateful! Thanks.
Posted By: Collective Re: Disabling font smoothing - 09/09/10 06:58 PM
Only a small number of functions can be called using rundll32. Your Excel.Application snippet should work if you call SystemParametersInfoA.
Posted By: Chessnut Re: Disabling font smoothing - 09/09/10 08:32 PM
Ahh, excellent! Thanks Collective. It's a shame I have to rely on a program which may or may not exist on the target computer though frown
© mIRC Discussion Forums