32260Re: Text box font size problem
- Nov 1, 2006--- In email@example.com, Chergarj@... wrote:
> Your description sounds familiar. Find the DPI settings - can'tThe DPI (dots-per-inch) value is set under Display Properties...
> remember how to find its path
Settings... Advanced . You can get there by right-clicking on the
desktop or via Control Panel.
However don't be tempted to change the DPI value to 'fix' the text
size problem. The optimum value is determined by the screen size
and resolution (see table below) and if you change it all programs
will be affected, potentially making text harder to read and
breaking other applications.
The best way to tackle this issue is to find the current DPI setting
using the GetDeviceCaps API call, and adjust the font size to suit:
open "Example" for window as #main
hwnd = hwnd(#main)
calldll #user32, "GetDC", hwnd As long, hdc As long
calldll #gdi32, "GetDeviceCaps", hdc As long, 88 As long, dpi As long
(There's probably an easier way to do this - I'm not an LB expert).
Table relating DPI value to screen size and resolution:
800 x 600: 10.4" diagonal at 96dpi, 8.3" diagonal at 120dpi
1024 x 768: 13.3" diagonal at 96dpi, 10.7" diagonal at 120dpi
1152 x 864: 15.0" diagonal at 96dpi, 12.0" diagonal at 120dpi
1400 x 1050: 18.2" diagonal at 96dpi, 14.6" diagonal at 120dpi
1600 x 1200: 20.8" diagonal at 96dpi, 16.7" diagonal at 120dpi
- << Previous post in topic Next post in topic >>