How many twips are there in a pixel. So if i set a forms width to 1000 then i would know how many pixels that is. Also the conversion of pixels to twips ??
Printable View
How many twips are there in a pixel. So if i set a forms width to 1000 then i would know how many pixels that is. Also the conversion of pixels to twips ??
How many twips are in a pixel depends on you screen resolution. And if it is a horizontal or a vertical twip. You can get it like this:
So, you can convert twips to pixels like this:Code:Msgbox Screen.TwipsPerPixelX
Msgbox Screen.TwipsPerPixelY
I hope this helps.Code:amountPixels = amountTwips * Screen.TwipsPerPixelX
[Edited by oetje on 11-26-2000 at 05:13 AM]
oetje, shouldn't it beDivide instead of multilply?Code:amountPixels = amountTwips / Screen.TwipsPerPixelX
On my Monitor, 15 Twips = One Pixel.
By the way, why don't you capitalize your name? Is this a custom in your culture? Does "oetje" have a meaning other tthan being a name?
Guv, thanks for correcting me.:)
Oetje is just my nickname. I don't know why I didn't capitalize it. (I created this username a long time ago)
Guv: What does it matter? It's just a username. (And I'm sure it has nothing to do with cultures!)
PsyVision: I believe that a Pixel is 15 Twips (most of the time). I'm not sure if it's different on your computer.
Maybe TwipsPerPixel varies, if you change your font size. Like Small Fonts, Large fonts.
Thanks, i think its all ok now.