How to show .CHM files in C#?
-
Hi ALL, I'm using C# application which has compiled help file .chm. i want to display this when Help Button is clicked. It's working fine when I run the application, but once the project is deployed and Installed using installer it's unable to find the .chm file. It seems to be the path problem. Does anyone have any idea how to do this? Warm Regards Abhijeet Ballal
-
Hi ALL, I'm using C# application which has compiled help file .chm. i want to display this when Help Button is clicked. It's working fine when I run the application, but once the project is deployed and Installed using installer it's unable to find the .chm file. It seems to be the path problem. Does anyone have any idea how to do this? Warm Regards Abhijeet Ballal
Hello Abhijeet Your description of the problem is perhaps not complete. Are you devleoping a Web or a Windows Application, what method are you using to display and load the .chm file? Assuming that you are working on a Windows application and you are using the Helpprovider extender provider to load the display the .chm file, in the design mode, you have to specify then name of the chm file which you want to load when the user presses the F1 button in the 'HelpNamespce' property of the extender provider. There is a browse button against that property which allows you to specify the path of your chm file. If you use the browse button, it hard codes the physical file of the path in that property, so that when you run the application from the VS IDE, it works fine, but if you build and deploy the project, it would search for the chm file at the same physical path as that on your development machine, and hence doesnt find it. The Solution: In development environment/machine, remove the physical path of the chm file from the HelpNamespace property of the help provider and leave only the name of the file along with the .chm extension. Now copy the .chm file in the folder [ProjectName]\Bin\Debug (The same folder where the .exe file of your project is). Run and verify that the chm file is still being located. When deploying, make sure that the exe file of your project and the chm file are in the same folder. This should solve the problem.
-
Hello Abhijeet Your description of the problem is perhaps not complete. Are you devleoping a Web or a Windows Application, what method are you using to display and load the .chm file? Assuming that you are working on a Windows application and you are using the Helpprovider extender provider to load the display the .chm file, in the design mode, you have to specify then name of the chm file which you want to load when the user presses the F1 button in the 'HelpNamespce' property of the extender provider. There is a browse button against that property which allows you to specify the path of your chm file. If you use the browse button, it hard codes the physical file of the path in that property, so that when you run the application from the VS IDE, it works fine, but if you build and deploy the project, it would search for the chm file at the same physical path as that on your development machine, and hence doesnt find it. The Solution: In development environment/machine, remove the physical path of the chm file from the HelpNamespace property of the help provider and leave only the name of the file along with the .chm extension. Now copy the .chm file in the folder [ProjectName]\Bin\Debug (The same folder where the .exe file of your project is). Run and verify that the chm file is still being located. When deploying, make sure that the exe file of your project and the chm file are in the same folder. This should solve the problem.
Hi your correct I'm using Windows application. The Solution you've mentioned above works fine. Can .chm file be the part of Deployment project so that whenever i build and install it will be there? at present i'm not able to add .chm to deployment. I'm using System.Diagnostics.Process to display the Help. Thanks for ur quick reply.. Warm Regards Abhijeet Ballal