mIRC Home    About    Download    Register    News    Help

Print Thread
#225789 09/09/10 03:37 PM
Joined: May 2007
Posts: 37
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: May 2007
Posts: 37
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.

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Only a small number of functions can be called using rundll32. Your Excel.Application snippet should work if you call SystemParametersInfoA.

Joined: May 2007
Posts: 37
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: May 2007
Posts: 37
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

Last edited by Chessnut; 09/09/10 08:33 PM.

Link Copied to Clipboard