unit udenglu;

interface

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

type
  TDengLuForm = class(TForm)
    name: TEdit;
    password: TEdit;
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Label2: TLabel;

    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DengLuForm: TDengLuForm;

implementation

{$R *.dfm}

 const
  iname='user';
  ipassword='00000';

procedure TDengLuForm.Button1Click(Sender: TObject);
begin

         if ( name.text=iname)and(password.text=ipassword) then
          ShowMessage( '欢迎使用学生管理系统')
else
          MessageDlg( '用户名或密码不正确,请重新输入!',mtError,[mbOk],0);


end;

procedure TDengLuForm.Button2Click(Sender: TObject);
begin
close;
end;

end.
