Results 1 to 7 of 7

Thread: Twips In a Pixel

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    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 ??

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    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:
    Code:
    Msgbox Screen.TwipsPerPixelX
    Msgbox Screen.TwipsPerPixelY
    So, you can convert twips to pixels like this:
    Code:
    amountPixels = amountTwips * Screen.TwipsPerPixelX
    I hope this helps.

    [Edited by oetje on 11-26-2000 at 05:13 AM]
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Multiply?

    oetje, shouldn't it be
    Code:
    amountPixels = amountTwips / Screen.TwipsPerPixelX
    Divide instead of multilply?

    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?
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    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)
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  5. #5
    Guest
    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.

  6. #6
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Maybe TwipsPerPixel varies, if you change your font size. Like Small Fonts, Large fonts.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    Thanks, i think its all ok now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width