Announcement

Collapse
No announcement yet.

Hilfe!!!!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hilfe!!!!

    Problem bei Passwortabfrage:

    procedure TPasswortabfrage.BitBtn2Click(Sender: TObject);
    var x, y: Real;
    begin
    y:=Strtofloat(Maskedit1.text);
    x:=0123456789;
    if
    x=y
    then
    begin
    Form2.Visible:=true;
    PasswortForm.close;
    end;
    end;

    Form2 Schließt sich mit! Was kann ich tun?
    If it's there and you can see it – it's REAL
    If it's there and you can't see it – it's TRANSPARENT
    If it's not there and you can see it – it's VIRTUAL
    If it's not there and you can't see it – it's GONE!

  • #2
    Hallo Christian,
    das Formular PasswortForm ist wohl bei dir das Hautpformular. Sobald dieses geschlossen wird, wird die Anwendung beendet.

    Du hast zwei möglichkeiten:
    1. Ein anderes Formular muß das Hauptformular sein (Einstellung unter Projekt)
    2. Statt PasswortForm.close versuch mal PasswortForm.hide

    Gruß
    Richar

    Comment


    • #3
      Hi Christian,<br>du solltest auch vermeiden, dein Passwort in Klartext im Code zu schreiben. Du kannst z.b. dein Passwort mit xor "verschlüsseln" und das eingegebene Passwort ebenfalls durch eine xor routine laufen lassen... <br><br>
      <PRE>

      function VERXOREN(s: String):string;
      var
      i : Integer;
      begin
      for i:=1 to length(s) do
      s[i]:=char(23 Xor Ord(s[i]));
      result := s;
      end;

      </PRE>
      <br>cu Michae

      Comment

      Working...
      X