Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can VFP6 run in background?
Message
 
À
19/03/2001 15:45:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00486603
Message ID:
00486611
Vues:
14
sure, and more!, you can convert your app in a NT service

* Código gentileza de Pepe Llopis

#DEFINE SERVICE_START 16
#DEFINE SERVICE_STOP 32
#DEFINE SERVICE_PAUSE_CONTINUE 64
#DEFINE SERVICE_INTERROGATE 128
#DEFINE SERVICE_USER_DEFINED_CONTROL 256
#DEFINE SERVICE_ALL_ACCESS 983551

DECLARE INTEGER OpenService IN ;

ADVAPI32.DLL ;

INTEGER hSCManager, ;
STRING @lpServiceName, ;
INTEGER dwDesiredAccess



DECLARE INTEGER StartService IN ;

ADVAPI32.DLL ;

INTEGER hService, ;
INTEGER dwNumServiceArgs, ;
INTEGER lpServiceArgVectors



hService = OpenService(hSCM, "mcsvc",;

SERVICE_START + SERVICE_STOP )
StartService(hService,0 ,0 )
CloseServiceHandle(hSCM)

of course you need program the timer , but you dont have UI!

Best Regards


>Hello all,
> We are working on a small program that will run once a day. We would like to get it to run off the system timer and execute at a certain time each day. Is there any way to get a foxpro program to run in the background? It would be perfect for this application. Thanks
>Carl Burkhart
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform