妖哥,大虾们出来 OleContainer1控件打开word文档总是占满整个form窗口,
void __fastcall TJzsdF::Button1Click(TObject *Sender)
{
FormOle = new TFormOle(this);
FormOle->Align=alClient;
FormOle->Parent = OlePanel; //Panel控件在主窗口MainFOrm中
FormOle->Show();
FormOle->OleContainer1->CreateObjectFromFile("D:\\我的资料\\桌面\\2014清单帮助.doc",true);
FormOle->OleContainer1->DoVerb(ovOpen);//以word的独立显示
FormOle->OleContainer1->OleObject.OlePropertyGet("Application").OlePropertyGet("ActiveDocument").OlePropertySet("ReadOnlyRecommended",true);
}