Autor Beitrag
chickenfigt1989
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Do 31.03.11 14:06 
Hallo
Will ein simplen Programm Login.
Habe nun folgendes:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm2.Button1Click(Sender: TObject);
begin
if Edit1.Text='master' then
begin
Form1.show;
Form2.close;
end
else
Showmessage('Du hast keinen Zutritt');
end;


Wollte nun noch was einbauen dass wenn das Passwort admin ist, das auf Form1 ein button sichtbar ist den man als normal benutzer nicht hat
wie macht man das?
lg
HenryHux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 542
Erhaltene Danke: 33

Windows 7 Premium
Delphi XE, Eclipse
BeitragVerfasst: Do 31.03.11 14:09 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm2.Button1Click(Sender: TObject);
begin
  button1.visible := false;
  if Edit1.Text='master' then
  begin
    Form1.show;
    Form2.close;
    button1.visible := true;
  end
  else
    Showmessage('Du hast keinen Zutritt');
end;
Thom
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 70
Erhaltene Danke: 5


Delphi 10 Seattle Prof.
BeitragVerfasst: Do 31.03.11 14:12 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm2.Button1Click(Sender: TObject);
begin
  if (Edit1.Text='master'or (Edit1.Text='admin'then
  begin
    Form1.Show;
    Form1.Button1.Visible:=Edit1.Text='admin';
    Form2.Close;
  end else ShowMessage('Du hast keinen Zutritt');
end;


@HenryHux:
user profile iconchickenfigt1989 hat folgendes geschrieben Zum zitierten Posting springen:
Wollte nun noch was einbauen dass wenn das Passwort admin ist, das auf Form1 ein button sichtbar ist den man als normal benutzer nicht hat
chickenfigt1989 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 444
Erhaltene Danke: 2



BeitragVerfasst: Do 31.03.11 16:18 
Vielen Dank hat mir weitergeholfen