UTS PRAKTIK BAHASA PEMROGRAMAN

 PROGRAM DELPHI MEMUNCULKAN MODEL GERGAJI/TRIANGLE
( Mengunakan Delphi XE8 )


A. TAMPILAN CODING

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.jpeg,
  Vcl.ExtCtrls, Vcl.Imaging.pngimage;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Label3: TLabel;
    Button2: TButton;
    Image1: TImage;
    Image2: TImage;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses Unit2;

procedure TForm1.Button1Click(Sender: TObject);
begin
if (Edit1.Text='EGI') AND (Edit2.Text='202308025') then
begin
label3.Visible:=true;
image1.Visible:=false;
Form2.Show;
end;
if (Edit1.Text<>'EGI') AND (Edit2.Text='202308025') then
begin
label3.Visible:=false;
image1.Visible:=true;
end;
if (Edit1.Text='EGI') AND (Edit2.Text<>'202308025') then
begin
label3.Visible:=false;
image1.Visible:=true;
end;
if (Edit1.Text<>'EGI') AND (Edit2.Text<>'202308025') then
begin
label3.Visible:=false;
image1.Visible:=true;
Edit2.Text:='*'
end;
end;

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

end.



B. GAMBAR DAN HASIL VIDEO


1. Tampilan Saat Password Salah



2. Tampilan Saat Password Benar