Enable/Disable CLEARTYPE

578 Views Asked by At

I'm using the following code to try to force enable CLEARTYPE option in user32.dll but don't work in representation of image from report text.

    [DllImport("user32.dll", SetLastError = true)]
            [return: MarshalAs(UnmanagedType.Bool)]
            static extern bool SystemParametersInfo(
                uint uiAction,
                uint uiParam,
                bool pvParam,
                uint fWinIni
            );

            const uint SPI_SETCLEARTYPE = 0x1049;
            const uint SPIF_UPDATEINIFILE = 0x01;
            const uint SPIF_SENDWININICHANGE = 0x02;

SystemParametersInfo(SPI_SETCLEARTYPE, 0, true, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE);

any advice?

0

There are 0 best solutions below