Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
..changing system time programmatically or by and Active
Message
De
18/10/2001 06:52:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
18/10/2001 03:20:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00570089
Message ID:
00570125
Vues:
28
This message has been marked as the solution to the initial question of the thread.
>Is there a way for change the system time using an Active X control ?
>Or maybe a way using code that probe to be is usefull ?
>
>
> Thanks for your answers ...

I don't know ActiveX for it but you could do with API :
DECLARE INTEGER SetSystemTime IN win32api STRING @ lpTime
DECLARE INTEGER GetSystemTime IN win32api STRING @ lpTime

lpCurrent = space(40)
GetSystemTime(@lpCurrent) && save current

* Set to 29th Feb, 2000 16:45:10.0100 
wYear = 2000
wMonth = 2
wDayOfWeek = 0 && ignored
wDay = 29
wHour = 16
wMinute = 45
wSecond = 10
wMilliseconds = 100

cNewTime = Num2Word(wYear)+;
Num2Word(wMonth)+;
Num2Word(wDayOfWeek)+;
Num2Word(wDay)+;
Num2Word(wHour)+;
Num2Word(wMinute)+;
Num2Word(wSecond)+;
Num2Word(wMilliseconds)

SetSystemTime(@cNewTime)

? 'After setsystem time :',datetime()
SetSystemTime(@lpCurrent)
? 'Reset back to current :',datetime()

Function Num2Word
lparameters tnDecimal
return chr(tnDecimal%256)+chr(int(tnDecimal/256))
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform