错误信息如下: --------------------------- Debugger Exception Notification --------------------------- Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 10006E10 in module 'pdf.ocx'. Read of address 0000001C'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 10006E10 in module 'pdf.ocx'. Read of address 0000001C'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
FPdf := TPdf.Create(self);
FPdf.Parent:=self;
FPdf.Align:=alClient;
FPdf.src:='D:\Test\GDCA_Test.pdf';
except
showmessage('error');
end;
它必须是动态创建的,否则窗体还没打开就出错!
在窗体关闭的时候最好把fpdf.free;把资源释放掉,否则也会出现该错误!