建立与流文本和图像文件图像文件、文本和

2023-09-07 00:45:45 作者:南笙北执

我需要在C#中的WinForms应用程序中显示特定图像和文字,所以我决定使用web浏览器。图像和文本被从数据库中检索。但是,我不知道如何将它们结合起来,创建文档。 谢谢!

I would need to display certain images and text in c# WinForms application, so I decided to use WebBrowser. Both images and text are retrieved from the database. However, I don't know how to combine them in the document creation. Thank you!

推荐答案

此外nobugz的建议,你可以实现的IMoniker一个公开的数据为mht(Web存档)上,并用IE文档的IPersistMoniker接口从你的对象加载。 HTTP://www.$c$cproject.com/KB/miscctrl/csEXWB的.aspx 是该接口的一个例子。 使用的IMoniker过的IStream的好处是,你可以为你的文件指定一个基本URL。

Besides nobugz's suggestion, you can implement IMoniker on an object that exposes your data as mht (web archive) and use IE document's IPersistMoniker interface to load from your object. http://www.codeproject.com/KB/miscctrl/csEXWB.aspx is an example for this interface. The benefit of using IMoniker over IStream is that you can specify a base URL for your document.