I have written a simple class(both c# and VB.net) which requests the opening of a chm file when the user presses F1. Is there a way that I can check to see if a specific topic id exists before I make the request to open the file?
At the moment if the topic id does not exist then the file does not even make an attempt to open and the user gets no response when pressing F1. I would prefer it if the topic id not existing meant the chm file still opens but at the table of contents.
try
{
Help.ShowHelp(ctlparent, filename, HelpNavigator.TopicId, topic);
}
catch
{
Help.ShowHelp(ctlparent, filename, HelpNavigator.TableOfContents);
}