指定相对路径 [英] Specifying a relative path

查看:166
本文介绍了指定相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows窗体项目。在当前目录中我有一个* .chm文件一个帮助文件夹。什么是从应用程序启动它们最简单的方法?我怎样才能为它们指定的相对路径?

I have a windows forms project. In the current directory I have a Help folder with *.chm files. What is the easiest way to launch them from the application? How can I specify the relative path to them?

推荐答案

您应该使用Help.ShowHelp做到这一点。

You should use Help.ShowHelp to do this

var chmFile = "CHM/test.chm";
Help.ShowHelp(ctrl, chmFile);



在默认情况下ShowHelp将搜索文件中的应用程序路径

by default ShowHelp will search file in the application path

这篇关于指定相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆