PROGRAM DELPHI MEMUNCULKAN MODEL GERGAJI/TRIANGLE



a.       Tampilan saat Password yang dimasukan salah.

 

b.       Tampilan saat Password yang dimasukan benar.







c.      Cooding.

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Winapi.ShellAPI;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    Button2: TButton;
    Label3: TLabel;
    Label4: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;


    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);



  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
if (Edit1.Text='YOSSY') AND (Edit2.Text='16') then
begin
  Shellexecute(Handle, 'open', 'D:\Project_10.exe', nil, nil, SW_SHOWNORMAL);
  label4.Visible:=false;
end;
if (Edit1.Text<>'YOSSY') AND (Edit2.Text='16') then
begin
  label3.Visible:=false;
  label4.Visible:=true;
end;
if (Edit1.Text='YOSSY') AND (Edit2.Text<>'16') then
begin
  label3.Visible:=false;
  label4.Visible:=true;
end;
if (Edit1.Text<>'YOSSY') AND (Edit2.Text<>'16') then
begin
  label3.Visible:=false;
  label4.Visible:=true;
end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Label3.Visible:=false;
Label4.Visible:=false;
Edit1.Text:='';
Edit2.Text:='';
end;

end.