开发者

How to retrieve path for a file embedded in Resources (Resource Manager)

I am trying to retrieve file path for a html file that is embedded in resource (resx开发者_Python百科 file) in VS2008 C# project. I want to give path of this file to native webbrowser control (PIEHtml) to be able to navigate (DTM_NAVIGATE) in my application. I know I can pass the string to this control using DTM_ADDTEXTW but since html text size is so big, I dont want to pass string to the control. I need to somehow extract the file path for this html file embedded inside resource manager.

I tried using but this does not give the file path of html inside assembly:

private ResourceManager resManager = new ResourceManager("AppName.FolderName.FileName", System.Reflection.Assembly.GetExecutingAssembly());

this.lbl.Text = resManager.GetString("StringInResources"); 

and also read Retrieving Resources in Satellite Assemblies but it did not solve my problem.

Can somebody please provide info as to how to achieve this ?


Wouldn't you first have to extract the resource? Or at least load it to memory?

Try this link: http://www.csharper.net/blog/getting_an_embedded_resource_file_out_of_an_assembly.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜