G
Guest
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.TableOfContents);
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.
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.TableOfContents);
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.