Re: Splash Screen and Image Control Problem
- From: "Dave" <Nobody@xxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 15:46:31 +0100
Rick
Screen.TwipsPerPixelX/Y always return integers, but it is possible using the
custom font size setting to get a value which is not an integer.
When I need this figure I make an object full screen get its scalewidth (and
scaleheight) in twips then change the scalemode to pixels and get the same
dimensions then divide one into the other. This is all done while the
program is loading so nothing is actually seen on the screen.
I always hated the non-standard font sizes but with LCD screens more common
use of this will be less unusual because these screens are best used at
their native resolution so if a user finds the fonts hard to read on a 17"
1280x1024 rather than lowering to 1024x768 which makes everything smear out
a bit, it is better to leave the resolution alone and use the large fonts
setting.
Dave
"Rick Rothstein" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message
news:e3B%23HPJTFHA.2940@xxxxxxxxxxxxxxxxxxxxxxx
>> 'dpi = <result of API call>
>> dpi = 96 'assume it returns 96
>
> I don't think you need an API call to get the dpi value... I'm pretty
> sure this will give it to you directly
>
> dpi = 1440 / Screen.TwipsPerPixelX
>
> where 1440 is the number of Twips per logical inch. I'm not sure whether
> horizontal or vertical governs if TwipsPerPixelX and TwipsPerPixelY are
> not the same (although my guess is TwipsPerPixelX).
>
> Rick - MVP
>
.
- Follow-Ups:
- Re: Splash Screen and Image Control Problem
- From: Rick Rothstein
- Re: Splash Screen and Image Control Problem
- From: Ken Halter
- Re: Splash Screen and Image Control Problem
- References:
- Splash Screen and Image Control Problem
- From: dm4714
- Re: Splash Screen and Image Control Problem
- From: Randy Birch
- Re: Splash Screen and Image Control Problem
- From: Rick Rothstein
- Splash Screen and Image Control Problem
- Prev by Date: Re: Splash Screen and Image Control Problem
- Next by Date: Re: MsgBox question
- Previous by thread: Re: Splash Screen and Image Control Problem
- Next by thread: Re: Splash Screen and Image Control Problem
- Index(es):
Relevant Pages
|