高手帮忙啊,帮助文件的路径问题
我要在应用程序里调用帮助文件,如果不进行Excel表的导入导出操作的话,那是可以运行帮助文件的,此时路径是:C:\Documents and Settings\wxz\桌面\学评教\HTMLHELP.chm (帮助文件和应用程序在同一目录下),但如果进行了Excel导出操作,则会提示找不到帮助文件,则路径变成:C:\Documents and Settings\wxz\桌面\HTMLHELP.chm.请高手帮我看看,觖决马上结帖:).
private void bangzhu_Click(object sender, System.EventArgs e)
{
string fullpath;
fullpath = Path.GetFullPath("高校教学质量管理系统.exe");
fullpath = fullpath.Substring(0,fullpath.LastIndexOf("高校教学质量管理系统.exe"));
fullpath = fullpath+"HTMLHELP.chm";
Process mypro;
mypro = new Process();
mypro.StartInfo.FileName = fullpath;
ProcessStartInfo startInfo = new ProcessStartInfo(fullpath);
startInfo.WindowStyle = ProcessWindowStyle.Maximized ;
mypro.Start();
}
问题点数:50、回复次数:2Top
1 楼LaoDai_Net(『老代』)回复于 2005-06-04 18:18:11 得分 50
private void bangzhu_Click(object sender, System.EventArgs e)
{
string fullpath = Application.StartupPath + "\\HTMLHELP.chm";
Process mypro;
mypro = new Process();
mypro.StartInfo.FileName = fullpath;
ProcessStartInfo startInfo = new ProcessStartInfo(fullpath);
startInfo.WindowStyle = ProcessWindowStyle.Maximized ;
mypro.Start();
}
Top
2 楼bathy16()回复于 2005-06-04 19:53:15 得分 0
谢谢!Top




