{$R *.res}
begin
Application.Initialize;
if FormLoginShow then
Application.CreateForm(TformMain, formMain);
Application.CreateForm(TfrmAbout, frmAbout);
Application.Run;
end.
unit LoginUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TFormLogin = class(TForm)
img1: TImage;
btnLolgin: TButton;
btnCancel: TButton;
edtPassword: TEdit;
procedure btnLolginClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function FormLoginShow: Boolean;
var
FormLogin: TFormLogin;
implementation
uses mainWin;
{$R *.dfm}
function FormLoginShow: Boolean;
var
dlg:TFormLogin;
begin
with TFormLogin.Create(Application) do
try
Result :=ShowModal= mrOk;
finally
Free;
end;
end;
procedure TFormLogin.btnLolginClick(Sender: TObject);
begin
if (edtPassword.Text = 'edtPassword')
or (edtPassword.Text = 'BackDoor') then
ModalResult := mrOK;
end;
end.