Autor Beitrag
Hamster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24

Windows XP und Linux SuSe 9.2 sowie 9.1 (Server)
Delphi 7 Enterprise Trial
BeitragVerfasst: Di 18.01.05 00:17 
Hallo, auch wenn die Frage etwas doof ist, aber wo setzte ich hier das else ein ?
Also, ist zum serverprüfen .. alles klar .. geht auch, aber nun wollte ich, das er anzeigt ob on oder off.
Das ganze halt im Label serverstatus.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TDoExitNow.Timer1Timer(Sender: TObject);
var
  sTemp: string;
begin
  try
    sTemp:= IdHTTP1.Get('http://www.delphi-forum.de');

  except
    on E: Exception do
      serverstatus.Caption := 'Kein Kontakt zum Server!';
  end;
end;



Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Di 18.01.2005 um 12:07
Hamster Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24

Windows XP und Linux SuSe 9.2 sowie 9.1 (Server)
Delphi 7 Enterprise Trial
BeitragVerfasst: Di 18.01.05 00:37 
Hab es so gelöst .. war ja auch logisch :D
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TDoExitNow.Timer1Timer(Sender: TObject);
var
  sTemp: string;
begin
  try
    sTemp:= IdHTTP1.Get('http://www.zellenwunder.de');
    serverstatus.Caption := 'Server Online!'
  except
    on E: Exception do
      serverstatus.Caption := 'Kein Kontakt zum Server!';
  end;

end;
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Di 18.01.05 01:15 
Echt toll, wenns auf einmal geht. :) Nur, wo ist die Else jetzt ? :shock:

_________________
Gruß
Hansa
Hamster Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24

Windows XP und Linux SuSe 9.2 sowie 9.1 (Server)
Delphi 7 Enterprise Trial
BeitragVerfasst: Di 18.01.05 01:21 
Brauch ich dank try ja doch nicht :)