u_login.pas

来自「学生学籍管理系统 数据库连接: 1、请在Sql server中附加数据库」· PAS 代码 · 共 60 行

PAS
60
字号
unit U_login;

interface

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

type
  TF_login = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  F_login: TF_login;

implementation

uses U_sims,U_about;

{$R *.dfm}

procedure TF_login.Button1Click(Sender: TObject);
begin
  if (trim(edit1.Text)='admin')and(trim(edit2.Text)='110') then
  begin
    F_login.Hide ;
    F_smis.Show  ;
  end
  else
    application.MessageBox('请确认用户名密码!' ,'错误',MB_OK);
end;

procedure TF_login.Button2Click(Sender: TObject);
begin
  application.Terminate ;
end;

procedure TF_login.Button3Click(Sender: TObject);
begin
  aboutbox.ShowModal ;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?