Autor Beitrag
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Di 05.11.02 17:28 
Halllo,
wie kann ich mit delphi die windows uhr verändern ?
gibt es SetTime oder so ?

MFG
mimi
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 05.11.02 18:59 

_________________
In the beginning was the word.
And the word was content-type: text/plain.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Di 05.11.02 19:24 
danke !
aber gibt es auch ne funktion die man so aufrufen könnte ?

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
var
  Time1:TTime
begin
  Time1:=10:10:10
  SetTime(Time1)
end

weil das währe nämlich einfacher ;)

MFG
mimi
hitstec
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 295



BeitragVerfasst: Di 05.11.02 23:13 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
function SetzeSystemZeit(Stunde,Minute,Sekunde,Milisekunde: Byte): Boolean;
var TimeStruct : TSystemTime; y,m,d: Word;
begin
 DecodeDate(Date,y,m,d);
 TimeStruct.wYear:=y;
 TimeStruct.wMonth:=m;
 TimeStruct.wDay:=d;
 TimeStruct.wHour:=Stunde;
 TimeStruct.wMinute:=Minute;
 TimeStruct.wSecond:=Sekunde;
 TimeStruct.wMilliSeconds:=Milisekunde;
 Result:=SetSystemTime(TimeStruct);
end;


Benutzt wird das so:

ausblenden Quelltext
1:
function SetzeSystemZeit(12,59,59,0);					
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Mi 06.11.02 15:43 
Hi
der Vollständigkeit halber möchte ich hinzufügen, dass die Uhr mit SetTime nach UTC-Zeit gestellt werden muss.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 06.11.02 18:20 
ja stimmt !!!

(kleiner insider gag !!!)

_________________
In the beginning was the word.
And the word was content-type: text/plain.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 07.11.02 20:05 
danke,gibt es keine funktion die man so aufruft:settime(Time)
und time ist von TTime ?`

währe viel einfacher;)

MFG
mimi
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Fr 08.11.02 12:57 
Hi
es gibt noch die Funktion SetLocalTime um die Uhrzeit nach der lokalen Zeit zu setzen, aber die verwendet auch die SYSTEMTIME Struktur.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 08.11.02 16:50 
du kannst auch die kompo nehmen dies beim EDH (siehe mein Link oben) gibt. Die nimmt dir die ganze arbeit ab !!!

_________________
In the beginning was the word.
And the word was content-type: text/plain.