473,413 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Codebase/htmlHelp files problem

I seem to have a small problem using html help files in .NET.

I created a program.chm file, and this one is located at the same location
of the .NET program.exe.

So I want to use following code top point to my help file:
Assembly myAssembly = Assembly.GetExecutingAssembly();
string sCodeBase=myAssembly.CodeBase;
mHelpFile=Path.ChangeExtension(sCodeBase,"chm");

And use it like this:
helpProvider1.HelpNamespace=mHelpFile;

Help.ShowHelp(this,mHelpFile,HelpNavigator.TableOf Contents);
Help.ShowHelpIndex(this, mHelpFile);

Now comes the funny thing:

mHelpFile turns out to be something like this:
"file://D:/MyPath/program.chm"
Note the "file://" part!!!!

If I use winhlp files "file://D:/MyPath/program.hlp" then this works fine
but if I use the html v1.xx help files "file://D:/MyPath/program.chm" then
this does not show!
But if I remove the "file://" and have "D:/MyPath/program.chm" then it
works fine!

Does anyone know how to detect and extract this "file://" part?
The Path class does not seem to have a method to extract the "xxxx://"
parts.
I could create my own method but I prefer to use the .NET functions.


Jul 21 '05 #1
2 1199
>....
mHelpFile turns out to be something like this:
"file://D:/MyPath/program.chm"
Note the "file://" part!!!!

If I use winhlp files "file://D:/MyPath/program.hlp" then this works fine
but if I use the html v1.xx help files "file://D:/MyPath/program.chm" then this does not show!
But if I remove the "file://" and have "D:/MyPath/program.chm" then it
works fine!

Does anyone know how to detect and extract this "file://" part?
The Path class does not seem to have a method to extract the "xxxx://"
parts.


I have current not so nice fix that works:

Assembly myAssembly = Assembly.GetExecutingAssembly();
mHelpFile=myAssembly.CodeBase;
if (mHelpFile.ToLower().StartsWith("file:///")) {
mHelpFile=mHelpFile.Substring(8,mHelpFile.Length-8);
}
mHelpFile=Path.ChangeExtension(mHelpFile,"chm");
helpProvider1.HelpNamespace=mHelpFile;
I someone have a better sulution, please tell me. :-)
Jul 21 '05 #2
A new problem has emerged:

helpProvider1.HelpNamespace="\\Myserver/program files/skyscan/test.chm"

It doesn't want to open my help file if I use "\\Myserver"
It does open it if I have a drive mapping "q:/program
files/skyscan/test.chm"

Anyone have a sollution for this?
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Søren \Pengman\ Pedersen | last post by:
Dear all My setup is this: A RMI server application running with the codebase property as follows: -Djava.rmi.server.codebase=http://localhost/Java/Rmiserver/ this location contains the...
7
by: Ruslan Popov | last post by:
Hi, I am trying to prevent an assembly being loaded from GAC and instead want it loaded from the application's base directory. However, the assembly always gets loaded from GAC. How to have it...
0
by: Elaine | last post by:
I have a truly curious problem with HtmlHelp and Sibling Mode in Visual C++ ..Net 2003 in an MFC app. Sibling mode allows the help viewer to display on top of the app, but if the app is clicked,...
2
by: BentleyInc | last post by:
I wrote a DownloadRequestHandler to be used in http://server/DownloadDir and I've made the correct IIS settings for DownloadDir. Currently I'm having problem loading up some dependent assemblies....
2
by: | last post by:
I seem to have a small problem using html help files in .NET. I created a program.chm file, and this one is located at the same location of the .NET program.exe. So I want to use following...
2
by: Tim | last post by:
I have placed my assemblies in different folders (as per project req.). I am using config file with <codebase> option and registry with codebase option (COM Interop) to enable the runtime to locate...
2
by: xamman | last post by:
hi there, i am trying to use a .NET assembly from a Cscript.exe .vbs (i.e. from COM) and could not get my .vbs to use my .net dll (gives a 'file not found error') unless i used the /codebase...
0
by: Gauls | last post by:
Hi, I have webservice application that uses some assemblies whoes version number keeps changing and are stored in some folder on the same machine as my webservice. Every Time the assembly version...
1
by: G Gerard | last post by:
Hello I have written some help files using Html Help Workshop version 4.74.8702 I use the following code to launch the chm file Declare Function HtmlHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA" _...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.