Home > Back-end >  Delphi show way to open the form errors
Delphi show way to open the form errors

Time:09-21

Var
LoginForm1: TLoginForm1;

Implementation

USES the
Admin_main;
{$R *. DFM}


Procedure TLoginForm1. Button1Click (Sender: TObject);
The begin
With Query1 do
The begin
The Close;
SQL. The Clear;
SQL. The Add (' select password, quanxian from login_user ");
SQL. The Add (' where the username=: name ');
ParamByName (' name '). The Value:=Edit1. Text;
The Open;
If FieldByName (" password "). Value<> Null then
The begin
If fieldbyname (" password "). Value=https://bbs.csdn.net/topics/Edit2.Text then
The begin
If FieldByName (' quanxian). Value='https://bbs.csdn.net/topics/admin' then
The begin
LoginForm1. Hide;
AdminMainForm1. Show;
End
The else ShowMessage (' student login ');
End
The else ShowMessage (' wrong password);
End
The else ShowMessage (' user does not exist ');
end;
end;

Perform show method can appear the following error, I baidu said set performance is that what you can, but I tried did not solve the problem, only to turn to

CodePudding user response:

AdminMainForm1 didn't build it,

CodePudding user response:

reference 1st floor DelphiGuy response:
adminMainForm1 didn't build it,
yes, in the same directory

CodePudding user response:

reference 1st floor DelphiGuy response:
adminMainForm1 didn't build it,
I refer to the form of unit file and automatically in the prompt,

CodePudding user response:

Into adminMainForm1 tracks have a look at what is the problem

CodePudding user response:

Reference light I can't, you have to Create the form instance: adminMainForm1:=TadminMainForm1. Create (Application);

CodePudding user response:

reference 5 floor DelphiGuy reply:
reference light I can't, you have to Create the form instance: adminMainForm1:=TadminMainForm1. Create (Application);

Problem solved, thank you

CodePudding user response:

Yes the form itself, under the premise of existence, to show the operation,
The existence of the form, there are two ways, one is a project to create create, 2 it is to dynamically create, either a can,
  • Related