Read szlammy's post. He explained it CLEARLY. 1440 twips per inch. If you change your screen resolution, that number will no longer be valid.
Twip = PixelNum& * screen.twipsperpixelx for horizontal and screen.twipsperpixely for vertical.
If you are using API, you can get the client area of your window with
where hwnd is the handle to your windowCode:Private Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, ByRef lpRect As RECT) As Long
and you can convert form pixel position to screen pixel position with this:
where as above hwnd is the handle to your form.Code:Public Declare Function ClientToScreen Lib "user32" (ByVal hWnd As Long, lpPoint As POINTAPI) As Long
Both RECT and POINTAPI are structures defined in the api text browser.




Reply With Quote