Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent Code
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00511306
Message ID:
00511372
Views:
19
Ismael,

There is no direct equivilent in VFP, however you can create your own method to work out the x and y twips values.
LOCAL lnHWnd, lnHDC	
LOCAL lnPixelsPerInchX	
LOCAL lnPixelsPerInchY	


#define LOG_PIXELS_X     88				
#define LOG_PIXELS_Y     90				
#define TWIPS_PER_INCH	 1440			

declare integer GetActiveWindow	in WIN32API
declare integer GetDC		in WIN32API integer lnHDC
declare integer GetDeviceCaps	in WIN32API integer lnHDC, integer lnCapIndex

lnHWnd = GetActiveWindow()
lnHDC  = GetDC(lnHWnd)

lnPixelsPerInchX = GetDeviceCaps(lnHDC, LOG_PIXELS_X)
lnPixelsPerInchY = GetDeviceCaps(lnHDC, LOG_PIXELS_Y)

with ThisForm
	.nTwipsX = TWIPS_PER_INCH / lnPixelsPerInchX
	.nTwipsY = TWIPS_PER_INCH / lnPixelsPerInchY
endwith
I think I got this code from MSDN but as you can see it updates two form properties with the X and Y twips.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform