AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Delphi Funktion in selbst erstellter Form
Thema durchsuchen
Ansicht
Themen-Optionen

Funktion in selbst erstellter Form

Ein Thema von DelphiUser1 · begonnen am 29. Sep 2012 · letzter Beitrag vom 2. Okt 2012
 
DelphiUser1

Registriert seit: 15. Sep 2012
56 Beiträge
 
#1

Funktion in selbst erstellter Form

  Alt 29. Sep 2012, 14:22
Hallo alle miteinander
ich habe in der Klasse Treg=class(TForm) eine Form erstellt (myform). Diese wird während der Laufzeit erzeugt. In Unit1 habe ich eine function eingebaut, mit der ich ein Passwort verschlüsseln kann(function XorStr(const Text: string; Key: Integer): string). Der gesamte Quellcode für myform steht unten. Leider ändert sich Label3 nicht in die Verschlüsselung sondern die caption bleibt leer. Kann mir da jemand helfen?


Delphi-Quellcode:
myform:=TReg.CreateNew(Self);
with myform do
  begin
    visible := true;
    Caption := 'Registrieren(2/2)';
    Left := Form1.Left;
    Top := Form1.Top;
    ClientHeight := Form1.ClientHeight;
    ClientWidth := Form1.ClientWidth;
    Autoscroll:=false;
    Button1 := TButton.Create(myForm);
    end;
    With Button1 do
    begin
      parent := myForm;
      visible := true;
      caption := 'Prozess abschliessen';
      width:=120;
      left := 150;
      top := 150;
      OnClick := Button1Click;
    end;
    Edit1 := TEdit.Create(myForm);
    With Edit1 do
    begin
      parent := myForm;
      visible := true;
      left := 150;
      top := 50;
    end;
    Edit2 := TEdit.Create(myForm);
    With Edit2 do
    begin
      parent := myForm;
      visible := true;
      left := 150;
      top := 100;
    end;
    Label1:=TLabel.Create(myform);
  with Label1 do
  begin
  parent := myForm;
  Font.Color:=clblack;
  visible := true;
  left := 20;
  top := 100;
  Caption := 'Benutzername:';
  Font.Size:=12;
  end;
  Label2:=TLabel.Create(myform);
  with Label2 do
  begin
  Parent:=Myform;
  Visible:=true;
  left := 20;
  top := 50;
  Caption := 'Passwort:';
  Font.Size:=12;
  end;
  Label3:=TLabel.Create(myform);
  with Label3 do
  begin
  Parent:=Myform;
  Visible:=True;
  left := 200;
  top := 50;
  Caption := XorStr(Edit1.Text, 21);
  Font.Size:=10;
  Font.Color:=clblack;
  end;
   end;
  Mit Zitat antworten Zitat
 

 

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:21 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz