From: Steve L. <ste...@sc...> - 2007-02-13 19:04:38
|
Thanks for that, I`ll give that a go when I get back to the UK Steve Robert May wrote: > Steve Loughran wrote: >> Does anyone know where I should be looking to determine if the user has >> selected "large" or "very large" fonts in the control panel -> display >> -> appearance settings? > > Various ways, depending exactly what you want to achieve. Here's one > way (although I don't have an OS that supports the 'very large' setting > - XP only I think - so you'll have to see what value you get for that). > > #!perl -w > use strict; > use warnings; > > use Win32::GUI qw(); > > sub LOGPIXELSX() {88} > > # Get the logical pixels per inch in the X direction for > # the default "DISPLAY" device > my $size = Win32::GUI::DC->new()->GetDeviceCaps(LOGPIXELSX); > > if ($size == 96) { # 96 dpi is small system font > print "Small System Font\n"; > } > elsif ($size == 120) { # 120 dpi is large system font > print "Large System Font\n"; > } > else { # All other sizes (on Win98) are called 'Custom' > print "Custom font size: ", $size, "dpi\n"; > } > __END__ > > > Regards, > Rob. > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > |