Delphi 简单的登录窗口


本文整理自网络,侵删。

 
unit ULogin;

interface

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

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

var
  Form1: TForm1;

implementation

uses UAdminPanel;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  user,pass:string;
begin
  user := Edit1.Text;
  pass := Edit2.Text;

  if (user='username') and (pass='password') then
  begin
    Form1.Hide;
    Form2.Show;
  end
  else
  begin
    showmessage('Maaf, username/password keliru');
  end;
end;

end.

相关阅读 >>

Delphi webbrowser1实现滚屏

Delphi drawing text 绘制文本

Delphi 通�^窗口句柄或窗口标题得到进程句柄

Delphi xe10 android 界面设计-个人心得

Delphi 的链式代码

Delphi 内存管理[4]

Delphi tstringlist 排序 customsort

Delphi 获取毫秒级时间戳

Delphi 2007 使用shelltreeview控件

Delphi xe mysql数据库操作类 mysqlhelper

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...