29-01-2010, 10:05 PM
السلام عليكم ورحمة الله
اخوآني الكرام, اعمل على تجربة لإنشآء فورمات(عدة فورمات) لكن لم افلح,
اليونيت 1 و اليونيت 2 في الأسفل,
هناك رسآلة خلل,
Access Violation at adress 004AA981 ... Read of Adress 000000000 (شئ من هذا)
هناك شئ ناقص, لكن لم اتمكن من معرفة ماذا, الخلل يحدث عند الضغط على Button1
بارك الله لكم
اخوآني الكرام, اعمل على تجربة لإنشآء فورمات(عدة فورمات) لكن لم افلح,
اليونيت 1 و اليونيت 2 في الأسفل,
PHP كود :
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Unit2;
type
TForm1 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
I : integer;
public
{ Public declarations }
end;
var
Form1: TForm1;
Frm: array of TForm2;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
SetLength(frm, i);
frm[i] := Form2.Create(application);
frm[i].Show;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
i := 0;
end;
end.
PHP كود :
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
ListBox1: TListBox;
ListBox2: TListBox;
private
{ Private declarations }
public
{ Public declarations }
Form2: TForm2;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
هناك رسآلة خلل,
Access Violation at adress 004AA981 ... Read of Adress 000000000 (شئ من هذا)
هناك شئ ناقص, لكن لم اتمكن من معرفة ماذا, الخلل يحدث عند الضغط على Button1
بارك الله لكم