&& Version.h #define VERSION_OF_WINDOWS (eval(ltrim(substr(os(), at(' ', os()))))) #define WIN95_VERSION 4.00 #define WIN98_VERSION 4.10 #define WINME_VERSION 4.90 #define WIN2K_VERSION 5.00 #define WINXP_VERSION 5.01 #define WIN2003_VERSION 5.02 #define WINVISTA_VERSION 6.00 #define WIN98_OR_HIGHER (VERSION_OF_WINDOWS >= WIN98_VERSION) #define WIN2K_OR_HIGHER (VERSION_OF_WINDOWS >= WIN2K_VERSION) #define WINXP_OR_HIGHER (VERSION_OF_WINDOWS >= WINXP_VERSION) #define WINVISTA_OR_HIGHER (VERSION_OF_WINDOWS >= WINVISTA_VERSION) *----------------------------------------------------------------------- #define VFP_9 (Version(5) >= 900) *-----------------------------------------------------------------------(2) in the initialisation of your application
=Vista_Init() function Vista_Init() local sError sError = on('Error') private declareError declareError = FALSE on error declareError = TRUE DECLARE integer GdiSetBatchLimit IN WIN32API integer =GdiSetBatchLimit(1) on error &sError return !m.declareError endfunc(3) add this where you init every datasession - including the default
do case case !VFP_9 otherwise local cmd cmd= 'set TableValidate to 0' &cmd cmd= 'set tableprompt off' &cmd cmd= 'set enginebehavior 70' && may not need this &cmd cmd= 'set reportbehavior 80' && may not need this &cmd endcase