Autor Beitrag
Leathl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 27.02.03 18:26 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 13:12, insgesamt 1-mal bearbeitet
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 27.02.03 18:48 
Alle Registry-Funktionen aus TRegistry geben TRUE bei Erfolg zurück und FALSE bei nicht Erfolg, damit sollte sich doch was anfangen lassen oder? :roll:
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 27.02.03 18:50 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 13:13, insgesamt 1-mal bearbeitet
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 27.02.03 18:54 
Na ween er hier:
ausblenden Quelltext
1:
reg.OpenKey('Täääst', false);					

FALSE zurückliefert konnte er den Schlüsseln nicht öffnen, weil er nicht da ist.
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 27.02.03 19:00 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 13:14, insgesamt 1-mal bearbeitet
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 27.02.03 19:10 
Logisch. Kuck dir deien if-bedingung noch mal genau an:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
var reg: tregistry; 
Name: string; 
PW: string; 
Server: integer; 
begin 
reg:= tregistry.Create; 
try 
  reg.RootKey:= HKEY_CURRENT_USER; 
  if reg.OpenKey('Täääst', false)= true then 
   Name:= reg.ReadString('Name'); 
   PW:= reg.ReadString('PW'); 
   Server:= reg.ReadInteger('Server'); 
finally 
  reg.Free; 
end;

Überleg mal, ob man da eventuell noch ein begin, end brauchen könnte. :wink:
Ansonsten kuck dir mal ein Grundlagentutorial an. Insbesondere zu Verzweigungen.
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 27.02.03 19:21 
---