Found a solution:
a) Look for registry.prg and registry.h in Visual Studio - do a search.
b) Add the following DEFINE to the registry.h
#DEFINE HKEY_CURRENT_CONFIG -2147483643 && BITSET(0,31)+5
c) Create a program
#INCLUDE registry.h
set proc to registry additive
local oReg
oReg = createObject('registry')
c) Make this call:
cValue = ''
oReg.getRegKey("DPIPhysicalX",@cValue,; "Display\Settings",HKEY_CURRENT_CONFIG)
d) cValue for REGULAR FONTS is '96'
e) cValue for LARGE FONTS is '120'
This works with my machine, but I am sure it needs more testing for verification. No error code although cValue returned "1010" until I got it right.
Robert
>>I designed a calendar form containing the monthview object included in vfp6. Everything works and looks fine. Later I encountered a user who is using Windows Large Fonts. The calendar looks like @#$%.
>>
>>Does anyone know how to work around this? Maybe even a API call that will tell me that Large Fonts are being used and I can program around it?
>
>You might take a look at the FONTMETRIC(6) function - I haven't tried this (and I'm in the middle of instaling a stubborn AGP card, so -please- try this yourself!) but you could get the value for some known font under both large and small fonts, save the values, and then test at run time; if the large font value is returned, you'd do whatever you need to do with large fonts.
>
>I'm fairly certain that a registry value under HKEY_CURRENT_USER\Display\Settings or HKEY_CURRENT_USER\Desktop\WindowMetrics also provides the information, but I'm not sure which, or which value is for large fonts.
>
>>
>>Robert
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement