delphi怎么才能实现登录窗体在主窗体前面显示,也就是同时显示两个窗体,只有登录后主窗体才能操作
2个回答
展开全部
做两个窗体 一个是主窗体 一个是登陆窗体. 将主窗体放在自动建立的列表里
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
testForm : Tform;
edit1 : Tedit;
begin
testForm := Tform.Create(form1);
testform.Left := form1.Left+30;
testform.Top := form1.Top+30;
testform.Width := 150;
testform.Height := 150;
testForm.ShowModal;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
testForm : Tform;
edit1 : Tedit;
begin
testForm := Tform.Create(form1);
testform.Left := form1.Left+30;
testform.Top := form1.Top+30;
testform.Width := 150;
testform.Height := 150;
testForm.ShowModal;
end;
end.
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询