I am just learning Delphi, I want to create a login using the form 1 and form 2, falidasi how if that's true of direct Form1 in form2, but if one does not enter into form2 but issued a message "error",,, or form2 as the main form so before entering into form2 will appear as a login Form1.

help me

You have to change Edit1's Property PasswordChar to *

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses
  Unit2;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  if (Edit1.Text='password') then
    Form2.ShowModal
  else
    Close;  
end;

end.