祁先生:
我的意图是从第二个窗体中传输数据到第一个窗体中,但我打开第一个窗体,执行if Showmodal=mrOk then
之后,程序不再进行,百思不得其解,请回答。
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus,SetForm, StdCtrls;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
setting1: TMenuItem;
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
procedure setting1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
i,j:Array [1..5]ofdo
uble;
S1
Char;
Sword
Char;
x,y:Array [1..5]ofdo
uble;
end;
var
Form1: TForm1;
implementation
//function Pass(PWord
Char):Boolean;far;external'passdll/Passlib';
{$R *.DFM}
procedure TForm1.setting1Click(Sender: TObject);
begin
//SWord:=STrAlloc(40);
ReadSetting(s1,i,j);
end;
{function TForm1.Read(i,j:Array ofdo
uble):Boolean;
var
x,y:Array [1..5]ofdo
uble;
u:integer;
WarnningLevel,FaultLevel: Array [1..5]ofdo
uble;
begin
read:=true;
For u:=1 to 5do
x
:=WarnningLevel;
y:=FaultLevel;
u:=0;
read:=False;
end;
}
procedure TForm1.FormCreate(Sender: TObject);
begin
with Form1do
if ShowMOdal=mrOk then
try
ReadSetting(s1,x,y);
SettingForm.Free;
finally
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
test1:double;
begin
test1:=i[1];
Edit1.Text:=FloatToStr(Test1);
end;
end.