|  | 
|   | 
 | 
  Jörg Sellmeyer |  KompilierenMarkierenSeparierenDeclare Day$[7],Month$[12]
Day$[0] = Sonntag
Day$[1] = Montag
Day$[2] = Diestag
Day$[3] = Mittwoch
Day$[4] = Donnerstag
Day$[5] = Freitag
Day$[6] = Samstag
Month$[0] = Januar
Month$[1] = Februar
Month$[2] = März
Month$[3] = April
Month$[4] = Mai
Month$[5] = Juni
Month$[6] = Juli
Month$[7] = August
Month$[8] = September
Month$[9] = Oktober
Month$[10] = November
Month$[11] = Dezember
Declare TimeStruct#
Struct _TimeStruct = wYear%,
wMonth%,
wDayOfWeek%,
wDay%,
wHour%,
wMinute%,
wSecond%,
wMilliseconds%
Dim TimeStruct#,_TimeStruct
Def GetSystemTime(1) !Kernel32,GetSystemTime
Def GetLocalTime(1) !Kernel32,GetLocalTime
Def SetSystemTime(1) !Kernel32,SetSystemTime
Def SetLocalTime(1) !Kernel32,SetLocalTime
Proc Ausgabe
    With TimeStruct#
        Print Day$[.wDayOfWeek%] +  der   + Str$(.wDay%) + .  + Month$[.wMonth% - 1] +   + Str$(.wYear%)
        Print Str$(.wHour%) + : + Str$(.wMinute%) + : + Str$(.wSecond%) + : + Str$(.wMilliseconds%)
    EndWith
EndProc
GetSystemTime(TimeStruct#)
Print SystemTime = Zeitzone ohne Sommer-/Winterzeitumstellung
Ausgabe
GetLocalTime(TimeStruct#)
Print
LokalTime = Zeitzone mit Berücksichtigung der Sommer-/Winterzeitumstellung
Ausgabe
With TimeStruct#
    MessageBox( Auf den   + Str$(.wDay%) + .  + Month$[.wMonth% - 2] +   + Str$(.wYear%) +  setzen?,Datum umstellen?,1)
EndWith
Achtung! Hier wird nicht auf den Jahreswechsel geachtet. Im Januar funktioniert es nur mit entsprechender Anpassung.
If %button = 1
    TimeStruct#.wMonth% = TimeStruct#.wMonth% - 1
    SetLocalTime(TimeStruct#)
    Ausgabe
    Print
    Print nach Tastendruck wird wieder zurückgesetzt!
    WaitKey
    TimeStruct#.wMonth% = TimeStruct#.wMonth% + 1
    SetLocalTime(TimeStruct#)
EndIf
    |  
  | 
|   | 
 | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...    | 04.05.2007  ▲ |  
  | 
|   | 
 
 
  | 
 | 
  |  | 
|   | 
 |  | 
|   | 
 
 
  |