안녕하세요~ 저는 막 델파이를 공부하는 학생인데요~ 실행에러가 발생했어요~
아시는 분 있으면 가르쳐 주세요~
Panel 3개를 Create하고 어떤 panel이 눌러졌는지 체크하는 방법이거든요....
unit Unit15;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Panel:TPanel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure PanelClick(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var panel_new1,panel_new2,panel_new3:TPanel;
begin
Panel_new1:=TPanel.Create(Self);
with Panel_new1 do
begin
parent:=Form1;
left:=10;
top:=5;
Caption:='Panel_new1';
onClick:=PanelClick;
end;
Panel_new2:=TPanel.Create(Self);
with Panel_new2 do
begin
parent:=Form1;
left:=10;
top:=Panel_new1.Height+10;
Caption:='Panel_new2';
onClick:=PanelClick;
end;
Panel_new3:=TPanel.Create(Self);
with Panel_new3 do
begin
parent:=Form1;
left:=10;
top:=Panel_new1.Height+Panel_new2.Height+20;
Caption:='Panel_new3';
onClick:=PanelClick;
end;
end;
procedure TForm1.PanelClick(Sender: TObject);
begin
ShowMessage((Sender as TPanel).Caption +'is Click');
end;
end.
이렇게 작성했는데..... 실행에러가 발생해요~
에러는 :
Project Project15.exe raised exception class EReadError with
message 'Invalid property value', Process stopped. Use step or Run
아무래도 여러가지 이유로 메모리가 꼬였다든지......
다시 재 부팅한다음 해보세요....
아니면 델파이관련파일이 깨진것도 같고..... 흠.....
하여튼 델파이가 정상은 아니네요...-.-;;
이숙경 wrote:
> 안녕하세요~ 저는 막 델파이를 공부하는 학생인데요~ 실행에러가 발생했어요~
>
> 아시는 분 있으면 가르쳐 주세요~
>
> Panel 3개를 Create하고 어떤 panel이 눌러졌는지 체크하는 방법이거든요....
>
> unit Unit15;
>
> interface
>
> uses
> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
> StdCtrls, ExtCtrls;
>
> type
> TForm1 = class(TForm)
> Button1: TButton;
> Panel:TPanel;
> procedure Button1Click(Sender: TObject);
> private
> { Private declarations }
> public
> { Public declarations }
> procedure PanelClick(Sender: TObject);
> end;
>
> var
> Form1: TForm1;
>
> implementation
>
> {$R *.DFM}
>
> procedure TForm1.Button1Click(Sender: TObject);
> var panel_new1,panel_new2,panel_new3:TPanel;
> begin
> Panel_new1:=TPanel.Create(Self);
> with Panel_new1 do
> begin
> parent:=Form1;
> left:=10;
> top:=5;
> Caption:='Panel_new1';
> onClick:=PanelClick;
> end;
>
> Panel_new2:=TPanel.Create(Self);
> with Panel_new2 do
> begin
> parent:=Form1;
> left:=10;
> top:=Panel_new1.Height+10;
> Caption:='Panel_new2';
> onClick:=PanelClick;
> end;
> Panel_new3:=TPanel.Create(Self);
> with Panel_new3 do
> begin
> parent:=Form1;
> left:=10;
> top:=Panel_new1.Height+Panel_new2.Height+20;
> Caption:='Panel_new3';
> onClick:=PanelClick;
> end;
>
> end;
>
> procedure TForm1.PanelClick(Sender: TObject);
> begin
> ShowMessage((Sender as TPanel).Caption +'is Click');
> end;
>
> end.
>
> 이렇게 작성했는데..... 실행에러가 발생해요~
>
> 에러는 :
>
> Project Project15.exe raised exception class EReadError with
> message 'Invalid property value', Process stopped. Use step or Run