开发者

how do I detect whether windows is in high contrast mode, or it displays large font or extra large font?

how do I detect whether windows is in high contrast m开发者_StackOverflow中文版ode, or it displays large font or extra large font?

I need to provide accessibility support in my javascript.

Thanks.


See this post.

in high contrast mode on Windows, background images should be set to "none" and it also changes the background color. This should override any CSS stylesheet. So you can perform some javascript to detect it after initial rendering.

Edit: You said you actually want to do this in Java. This has been covered before on SO:

Turns out the win.highContrast.on property was added in Java 1.4.1 for this purpose.


Try SystemParametersInfo function with the following parameters:

  • SPI_GETHIGHCONTRAST
  • SPI_GETICONTITLELOGFONT
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜