Autor Beitrag
Ikarus7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 36



BeitragVerfasst: Sa 10.12.05 20:14 
Ich habe ein Delhi-Programm ohne Form.
Mit Form war ein Timer kein problem - ein klick, einstellen, fertig.
Ich habe versucht mit timer1 := ttimer.create;
etc einen timer einzubauen, das scheint auch zu klappen, aber den timer.ontick bekomme ich nicht hin.
Was für einen code muss ich dafür einbinden ?
Handycommander
ontopic starontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1054

Windows XP Pro, Vista
Visual Studio 2008
BeitragVerfasst: Sa 10.12.05 20:30 
es gibt keine timer.ontick...

mfg
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 10.12.05 20:33 
ansonsten erstellst du einen thread mit einer schleife, und einem sleep, wobei das sleep dann dem interval entspricht ;)
SAiBOT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 6

XP SP2; 7
D7; D2009
BeitragVerfasst: Mo 12.12.05 22:58 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
program Project1; 

{$APPTYPE CONSOLE} 

uses 
  SysUtils, 
  Windows; 

procedure DoTimer; 
begin 
  WriteLn('timer funzt!'); 
end

begin 
  SetTimer(000, @DoTimer); 
  MessageBox(0'123''456', MB_ICONERROR); 
end.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 12.12.05 23:02 
Kann man dein programm auch irgendwie wieder beenden? :-?

Timer in der Komnsole:
www.luckie-online.de...imer_in_Konsole.html