M
mo
Unregistered / Unconfirmed
GUEST, unregistred user!
以下共有三个窗体:MainForm(MDI窗体),PmbhForm(屏幕保护窗体),PmbhpassForm密码对话窗体
MDI主窗体中的代码:
procedure TMainForm.pbClick(Sender: TObject);
begin
; PmbhForm:=TPmbhForm.create(Application);
; PmbhForm.show;
end;
屏幕保护窗体中的代码:
procedure TPmbhForm.FormKeyDown(Sender: TObject; var Key: Word;
; Shift: TShiftState);
begin
; PmbhForm.close;
; PmbhForm.free;
; showmessage('s1');
; PmbhpassForm:=TPmbhpassForm.create(Application);
; showmessage('s2');
; PmbhpassForm.showmodal;
; showmessage('s3');
end;
密码对话窗体中的代码:
procedure TPmbhpassForm.NOBtnClick(Sender: TObject);
begin
; PmbhpassForm.close;
; PmbhpassForm.free;
; showmessage('n1');
; PmbhForm:=TPmbhForm.create(Application);
; showmessage('n2');
; PmbhForm.show;
; showmessage('n3');
end;
procedure TPmbhpassForm.OKBtnClick(Sender: TObject);
begin
; PmbhpassForm.close;
; showmessage('y1');
; PmbhpassForm.free;
; showmessage('y2');
; mainform.setfocus;
; showmessage('y3');
end;
问题:1:运行“showmessage('y3');“之后出错,提示为:
; ; ; ; ;'Access violation at address 00C5066C,Read of address FFFFFFFF'
; ; ; 2:运行“showmessage('y3');“之后出错,提示为:
; ; ; ; ;'Access violation at address 00402EAE in module 'xsgl.exe' ,Read of address EFBB6623'
DFW们,这怎么解决?(就这么多分了,请关照下贫困线下的新手吧,若分不够可以后再补的)
MDI主窗体中的代码:
procedure TMainForm.pbClick(Sender: TObject);
begin
; PmbhForm:=TPmbhForm.create(Application);
; PmbhForm.show;
end;
屏幕保护窗体中的代码:
procedure TPmbhForm.FormKeyDown(Sender: TObject; var Key: Word;
; Shift: TShiftState);
begin
; PmbhForm.close;
; PmbhForm.free;
; showmessage('s1');
; PmbhpassForm:=TPmbhpassForm.create(Application);
; showmessage('s2');
; PmbhpassForm.showmodal;
; showmessage('s3');
end;
密码对话窗体中的代码:
procedure TPmbhpassForm.NOBtnClick(Sender: TObject);
begin
; PmbhpassForm.close;
; PmbhpassForm.free;
; showmessage('n1');
; PmbhForm:=TPmbhForm.create(Application);
; showmessage('n2');
; PmbhForm.show;
; showmessage('n3');
end;
procedure TPmbhpassForm.OKBtnClick(Sender: TObject);
begin
; PmbhpassForm.close;
; showmessage('y1');
; PmbhpassForm.free;
; showmessage('y2');
; mainform.setfocus;
; showmessage('y3');
end;
问题:1:运行“showmessage('y3');“之后出错,提示为:
; ; ; ; ;'Access violation at address 00C5066C,Read of address FFFFFFFF'
; ; ; 2:运行“showmessage('y3');“之后出错,提示为:
; ; ; ; ;'Access violation at address 00402EAE in module 'xsgl.exe' ,Read of address EFBB6623'
DFW们,这怎么解决?(就这么多分了,请关照下贫困线下的新手吧,若分不够可以后再补的)