delphi 跳转后 edit.text
unitUnit3;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,F...
unit Unit3;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type TForm3 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject); var
user : string ;
password : string ; //密码
password1: string; //确认密码
//conini: tinifile;
begin
user := form3.Edit1.Text ; password:=form3.Edit2.text;
password1:=form3.Edit3.text;
//conini:=tinifile.create('C:\Documents and Settings\Administrator\桌面\1\5\wj.ini');
if user ='' then begin
showmessage('空');
end
else
showmessage(user);
if password<>password1 then
begin
showmessage('两次输入的密码不同,请重新输入!');
form3.Edit2.Text:='';
form3.Edit3.Text:='';
end;
end;
procedure TForm3.Button2Click(Sender: TObject);begin
form3.edit1.Text := '' ; form3.edit2.Text := '';
form3.edit3.Text := '';
end;
end.
//跳转页面代码 form1
procedure TForm1.N2Click(Sender: TObject);var
form3: tform3;
begin
form3:=tform3.create(self) ;
form3.Show ;
end;
form3 上始终报空 无论页面上填什么 这是怎么回事 ???? 展开
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type TForm3 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form3: TForm3;
implementation
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject); var
user : string ;
password : string ; //密码
password1: string; //确认密码
//conini: tinifile;
begin
user := form3.Edit1.Text ; password:=form3.Edit2.text;
password1:=form3.Edit3.text;
//conini:=tinifile.create('C:\Documents and Settings\Administrator\桌面\1\5\wj.ini');
if user ='' then begin
showmessage('空');
end
else
showmessage(user);
if password<>password1 then
begin
showmessage('两次输入的密码不同,请重新输入!');
form3.Edit2.Text:='';
form3.Edit3.Text:='';
end;
end;
procedure TForm3.Button2Click(Sender: TObject);begin
form3.edit1.Text := '' ; form3.edit2.Text := '';
form3.edit3.Text := '';
end;
end.
//跳转页面代码 form1
procedure TForm1.N2Click(Sender: TObject);var
form3: tform3;
begin
form3:=tform3.create(self) ;
form3.Show ;
end;
form3 上始终报空 无论页面上填什么 这是怎么回事 ???? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询