Enable Cleartype Programmatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

Are there any APIs to check and enable/disable Clear Type on a Pocket PC
using .Net CF (P/Invoke)?

Thanks in advance,
Joe
 
Use SystemParametersInfo P/Invoke [1] for that. Here you are example:


SystemParametersInfo(SPI_SETFONTSMOOTHING, 1, 0, SPIF_SENDWININICHANGE
| SPIF_UPDATEINIFILE);

....

int SPI_GETFONTSMOOTHING = 74;
int SPI_SETFONTSMOOTHING = 75;
int SPIF_UPDATEINIFILE = 1;
int SPIF_SENDWININICHANGE = 2;

[System.Runtime.InteropServices.DllImport("coredll.dll")]
extern static int SystemParametersInfo(int uAction , int uParam, int
lpvParam, int fuWinIni);


[1]
http://msdn.microsoft.com/library/d...y/en-us/sysinfo/base/systemparametersinfo.asp
 
Thank you Sergey!

Sergey Bogdanov said:
Use SystemParametersInfo P/Invoke [1] for that. Here you are example:


SystemParametersInfo(SPI_SETFONTSMOOTHING, 1, 0, SPIF_SENDWININICHANGE
| SPIF_UPDATEINIFILE);

....

int SPI_GETFONTSMOOTHING = 74;
int SPI_SETFONTSMOOTHING = 75;
int SPIF_UPDATEINIFILE = 1;
int SPIF_SENDWININICHANGE = 2;

[System.Runtime.InteropServices.DllImport("coredll.dll")]
extern static int SystemParametersInfo(int uAction , int uParam, int
lpvParam, int fuWinIni);


[1]
http://msdn.microsoft.com/library/d...y/en-us/sysinfo/base/systemparametersinfo.asp


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Joseph said:
Hi everyone,

Are there any APIs to check and enable/disable Clear Type on a Pocket PC
using .Net CF (P/Invoke)?

Thanks in advance,
Joe
 
Back
Top