小
小小鸟2001
Unregistered / Unconfirmed
GUEST, unregistred user!
在用OPENDIALOG打开文件时,怎么在OLECONTAINER中显示出来,我的代码如下
var olestream :TStream;
f :TFileStream;
begin
NotDetail.Visible :=true;
NotDetail.PageIndex :=3;
if OpenDialog.Execute then
begin
try
f :=TfileStream.Create(OpenDialog.FileName,fmOpenReadWrite);
OpenDialog.Files.SaveToStream(f);
// OleFileName := OpenDialog.FileName;
f.Position := 0;
OleContainer.LoadFromStream(f);
Show;
except
Release; // free form on error
raise; // re-raise exception
end;
end;
结果导致DOWN机,为什么?
var olestream :TStream;
f :TFileStream;
begin
NotDetail.Visible :=true;
NotDetail.PageIndex :=3;
if OpenDialog.Execute then
begin
try
f :=TfileStream.Create(OpenDialog.FileName,fmOpenReadWrite);
OpenDialog.Files.SaveToStream(f);
// OleFileName := OpenDialog.FileName;
f.Position := 0;
OleContainer.LoadFromStream(f);
Show;
except
Release; // free form on error
raise; // re-raise exception
end;
end;
结果导致DOWN机,为什么?