I have problem with my form application created in Delphi 5. In this app I have few buttons which open (set visible property) different forms. This forms as a parent have Panel. Only one function is overridden:
procedure TForm.CreateParams(var Params : TCreateParams);
begin
inherited CreateParams(Params);
with Params do begin
Style := ws_Child;
X :=FormMain.panelMain.Left;
Y :=FormMain.panelMain.Top;
Height :=FormMain.panelMain.Height;
Width := FormMain.panelMain.Height;
WndParent := FormMain.Handle;
end
end;
我也能够改变小组的实际形式:
procedure TFormMain.ChangeToForm(newForm: TMainForm);
begin
if (newForm=nil) or (newForm=lastForm) then EXIT;
actForm:=newForm;
actForm.Visible :=true;
if assigned(lastForm) then lastForm.Visible:=false;
lastForm:=actForm;
LabelScreen.Caption:=actForm.Caption;
newForm.Left := 0;
newForm.Top := 0;
newForm.Width := panelMDI.Width;
newForm.Height := panelMDI.Height;
newForm.Left := panelMDI.Left;
newForm.Top := panelMDI.Top;
end;
When I open application everything works fine. Buttons change forms. Everything is ok. But when user don t use this app (don t changes forms etc.) for some period of time. Clicking on the buttons generate exceptions:
Access violation at address 0044D761 in module rozpoznawanie.exe . Read of address 00000004; EAccessViolation
[...]
00534f2e jz loc_534fe9
00534f34 196 mov eax, [ebp-8]
00534f37 mov [$54b3a4], eax
00534f3c 197 mov dl, 1
00534f3e mov eax, [$54b3a4]
00534f43 > call -$9c194 ($498db4) ; Forms.TCustomForm.SetVisible
00534f48 198 cmp dword ptr [$54b3a8], 0
00534f4f jz loc_534f5d
00534f51 xor edx, edx
00534f53 mov eax, [$54b3a8]
00534f58 call -$9c1a9 ($498db4) ; Forms.TCustomForm.SetVisible
[...]
I ve looked everywhere and I don t know why it appears. Do you have some ideas?
http://www.ohchr.org。
我发现这个问题可能早些:
00756bc8 vcl70.bpl Controls.TWinControl.HandleNeeded
00756bd5 vcl70.bpl Controls.TWinControl.GetHandle
0076e675 vcl70.bpl Forms.TCustomForm.GetMonitor
0076ecd0 vcl70.bpl Forms.TCustomForm.SetWindowToMonitor
0076daf1 vcl70.bpl Forms.TCustomForm.SetVisible
www.un.org/Depts/DGACM/index_french.htm 我读到,如果我们在电脑上安装了不止一个监测器,有时会出现这一问题。 但是,我试图改变对蒙托特人的财产,这并不奏效。