DAX Error错误一步都发送在ActiveForm里面,下面是我转的Borland网站上的补救做法,我曾经碰到过一次这样的问题,采用了Borland的办法也解决不了,后来检查出来问题是自己代码的问题,你说Show没有问题,其实ShowModal也是没有问题的,问题就在你的Free上面,窗口析构的时候有些东西没有被正确释放,所以才会出现那样的问题,不烦把tform1的代码贴上来看看如何,先测一下下面的做法(把Activex.pas拷贝到当前目录,然后做如下的修改)
----------------转自网络
下面是一段关于DAX Error错误的修改资料(borland的网站)
when using Internet Explorer in Wink2, WinXp, ActiveForm or ActiveX control raise
DAX error : access violation at address 000
reason :
delphi's ocx use same parking window procedure.
one ocx must use individual parking window proc.
fix error.
edit delphi VCL source routine in axctrls.pas
and compile axctrls.pas
copy axctrls.dcu to lib directory.
axctrls.pas
function ParkingWindow: HWND
var
TempClass: TWndClass
ParkingName : String
begin
Result := xParkingWindow
if Result <> 0 then Exit
// fix Dax error : accessviolation (win2k, win xp)
ParkingName := 'DAXParkingWindow_' + Format('%p', [@ParkingWindowProc])
FillChar(TempClass, sizeof(TempClass), 0)
if not GetClassInfo(HInstance, PChar(ParkingName), TempClass) then // fix Dax error : accessviolation (win2k, win xp)
begin
TempClass.hInstance := HInstance
TempClass.lpfnWndProc := @ParkingWindowProc
TempClass.lpszClassName := PChar(ParkingName)
// fix Dax error : accessviolation (win2k, win xp)
if Windows.RegisterClass(TempClass) = 0 then
raise EOutOfResources.Create(SWindowClass)
end
xParkingWindow := CreateWindowEx(WS_EX_TOOLWINDOW, TempClass.lpszClassName, nil,
WS_POPUP, GetSystemMetrics(SM_CXSCREEN) div 2,
GetSystemMetrics(SM_CYSCREEN) div 2, 0, 0, 0, 0, HInstance, nil)
SetWindowPos(xParkingWindow, 0, 0, 0, 0, 0, SWP_NOACTIVATE or SWP_NOREDRAW
or SWP_NOZORDER or SWP_SHOWWINDOW)
Result := xParkingWindow
end;