[AccessD] A2K: VB Equivalent

Drew Wutka DWUTKA at marlow.com
Wed Mar 26 20:07:23 CST 2003


Charlotte answered the icon question.  Here's a function for the Twips per
pixel.  Put this in a module, then call it when your database starts up.
Then you'll have two Global variables to represent the twips per pixel x and
y.

Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal
nIndex As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal
hdc As Long) As Long
Public intTwipsPerPixelX As Long
Public intTwipsPerPixelY As Long
Function GetTwipsPerPixel()
Dim dwReturn
dwReturn = GetDC(0)
intTwipsPerPixelX = 1440 / GetDeviceCaps(dwReturn, 88)
intTwipsPerPixelY = 1440 / GetDeviceCaps(dwReturn, 90)
dwReturn = ReleaseDC(0, dwReturn)
End Function

 

-----Original Message-----
From: Darren DICK
To: AccessD List
Sent: 3/26/03 6:28 PM
Subject: [AccessD] A2K: VB Equivalent

Hello all
I am doing something in access that was originally in VB
I have 2 problems where I know of no equivalent in VBA

Does anyone know of an alternative in Access to...
VB's Me.Icon and VB's Screen.TwipsPerPixelX 

Many thanks in advance

Darren

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list