本人才学了一个多月的DELPHI,现在正照着别人的程序试着再做一个小的程序.问题在我加了一个打印的功能后(打印功能使用中是正常没错误提示的),退出程序就提示出错了,如下两个提示:
Access violation at address 00631B51 in module 'MES.exe'  . Read of address 04D8B18System Error. Code:1400. 无效的窗口句柄。
我用的打印控件是:FastReport  的 frReport frDBDataSet1
打印的代码如下:
ReportFileName := ExtractFilePath(Application.ExeName)+'frreport.frf';
if FileExists(ReportFileName) then begin
DM1.frReport.LoadFromFile(ReportFileName);
DM1.frReport.ShowReport;
end;
因本人技术不到家,只好在此望各位赐教!