我想編制一個界面。通過點擊對應的操作,分別打開word或Execl檔案,檔案嵌入當前是的界面中,檔案不允許操作,不允許保存,并且也不允許復制與粘貼(包括Ctrl+C),允許上下滾動查看。(最好有開發DEMO),可使用免費的第三方控制元件。有沒有哪位大俠幫幫忙,謝謝。
uj5u.com熱心網友回復:
D7里的DEMO中有OLE的一個程式。好像可以。手上沒有Delphi7 找不到。uj5u.com熱心網友回復:
以只讀打開,用系統勾子屏蔽CTRL+C,CTRL+Vuj5u.com熱心網友回復:
dsoframer.ocx即可滿足你的需求。uj5u.com熱心網友回復:
打開excel用F1Book控制元件操作控制沒問題uj5u.com熱心網友回復:
OleContainer: TOleContainer;
............................................................
FileName := 'D:\Test.pdf';
Ext := LowerCase(ExtractFileExt(FileName));
OleContainer.CreateObjectFromFile(FileName, False);
OleContainer.DoVerb(ovPrimary);
if (Ext = '.doc') or (Ext = '.docx') then
OleContainer.OleObject.Application.ActiveDocument.Protect(2)
else
OleContainer.OleObject.Application.ActiveSheet.Protect;
OleContainer.OleObject.application.CommandBars['Standard' ].Visible := False;
OleContainer.OleObject.application.CommandBars['Formatting'].Visible := False;
OleContainer.OleObject.application.CommandBars['Reviewing' ].Visible := False;
uj5u.com熱心網友回復:
OleContainer: TOleContainer;
............................................................
FileName := 'D:\Test.doc';
Ext := LowerCase(ExtractFileExt(FileName));
OleContainer.CreateObjectFromFile(FileName, False);
OleContainer.DoVerb(ovPrimary);
if (Ext = '.doc') or (Ext = '.docx') then
OleContainer.OleObject.Application.ActiveDocument.Protect(2)
else
OleContainer.OleObject.Application.ActiveSheet.Protect;
OleContainer.OleObject.application.CommandBars['Standard' ].Visible := False;
OleContainer.OleObject.application.CommandBars['Formatting'].Visible := False;
OleContainer.OleObject.application.CommandBars['Reviewing' ].Visible := False;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/19231.html
標籤:VCL組件開發及應用
下一篇:二手網站er圖
