帮助文件创建映像问题 [英] Help File Creation Image problem
问题描述
我正在尝试为Windows Ce 5.0创建帮助文件.
而且我也能够显示文字.但是问题是当我尝试在html文件中显示Image时,模拟器中没有显示图像.
Hi,
I am trying to create a help file for the Windows Ce 5.0.
And I was able to display text also. But the problem is when I try to display the Image in the html file ,no image is getting displayed in the emulator.
String path = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
Help.ShowHelp(this, path + @"\HTMLPage1.htm");
图像与exe以及html文件位于同一文件夹中.
< img src ="tim.2bp" alt =图片显示"/>
当我在Windows Ce Emulator中打开html页面时,我可以看到图像.但是当exe调用html页面时,图像无法显示.
我为此引用了msdn链接.. http://msdn.microsoft.com/en-us/library /ms229662.aspx [ ^ ]
请帮助我解决问题...
And the image is in the same folder as that of the exe as well as the html file.
<img src="tim.2bp" alt="Image Display"/>
And When I open the html page in the Windows Ce Emulator I am able to see the Image. But when the exe is calling the html page the image is not getting displayed.
I refered the msdn link for this..http://msdn.microsoft.com/en-us/library/ms229662.aspx[^]
Please help me to solve the issue...
推荐答案
我这样修改了您的代码,Path.Combine
避免了必须在所有内容中添加"\\"的问题.
I modified your code thusly, thePath.Combine
saves issues with having to add "\\" to everything.
String path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
string file = Path.Combine(path, @"HTMLPage1.htm");
if(File.Exists(file))
{
Help.ShowHelp(this, file);
}
除此之外,我看到的示例要求您将文件安装到帮助目录中.我通过将图像添加到项目并在文件上设置始终复制"标志来停止抱怨.
Besides that, the example I saw requires that you install the file into the help directory. I got it to stop complaining by adding the image to the project and setting the "copy always" flag on the file.
这篇关于帮助文件创建映像问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!