How to open a particular page in chm file using c# WPF
Asked Answered
I

2

5

I want to Open the particular page of CHM file. I am using WPF application. Currently i have implemented the

System.Diagnostics.Process.Start(filepath)

This will not help open the particular page

Regards, NewDev

Imogen answered 18/4, 2012 at 15:53 Comment(0)
S
5

It sounds like you're essentially trying to add context-sensitive help to a WPF application. For example, that if you hit F1 with your cursor in a specific textbox, you'll see help for that specific textbox.

If that's the case, see this article:

http://blogs.msdn.com/b/mikehillberg/archive/2007/07/26/a-context-sensitive-help-provider-in-wpf.aspx

or this one:

http://www.netframeworkdev.com/windows-presentation-foundation-wpf/contextsensitive-help-in-wpf-73953.shtml

Specifically, you can accomplish this using the System.Windows.Forms.Help.ShowHelp() command.

You may need to add a reference to System.Windows.Forms.dll to access the Help functions.

Finally, if you're still lost on using Help files, all the info you need should be right here: http://msdn.microsoft.com/en-us/library/2ksk25ts.aspx This is all for Windows Forms, of course, but it should carry over to WPF if you have the correct references.

Salvadorsalvadore answered 18/4, 2012 at 16:1 Comment(0)
T
5

You have to add "System.Windows.Forms" reference to your project and then call Help.ShowHelp method to open a specific page in "xyz.chm"

System.Windows.Forms.Help.ShowHelp(null, "xyz.chm","xyz_index.html");

Hope this helps :)

Tangled answered 30/5, 2013 at 0:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.