CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: DLU to Twips

  1. #1
    Join Date
    Aug 2000
    Posts
    60

    DLU to Twips

    Hi,
    Does anyone know 1 DLU equal how many twips in VB?

    Thanks
    Sue


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: DLU to Twips

    Do you mean the Dialog Unit?

    A horizontal DLU is the average width of the current dialog box font divided by 4. A vertical DLU is the average height of the current dialog-box font divided by 8.

    You can get the average width and height of the current font using the GetTextMetrics() API function. You can convert the values to twips by multiplying with Screen.TwipsPerPixelX and Screen.TwipsPerPixelY.


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

Featured