Link to home
Start Free TrialLog in
Avatar of jimboVB
jimboVB

asked on

Opening Help File .chm using VB.NET

I want to open and help(.chm) file in my application. I have added a HelpProvider which when i pressed the F1 key my help file will be opened. But when i want to Click on the Menu Item to open up my help topics, i'm not sure how to do it.

I've tried this

   Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFrown.Click
        Dim hwndHelp As Long
        hwndHelp = HtmlHelp(Me.hwnd, "C:\Users\Jimmy\Help project\communicBox\Help.chm", HH_DISPLAY_TOC, 0)

    End Sub


but there's an error shown " 'hwnd' is not a member of 'WindowsApplication1.Form1' ".
Is there any other possible solutions to solve this?


JimboVB
Avatar of jimboVB
jimboVB

ASKER

could someone gimme some help abt this??

JimboVB
ASKER CERTIFIED SOLUTION
Avatar of appari
appari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jimboVB

ASKER

do i need to declare 'help' before i use this code?

help.showhelpindex(me,"helpURL")

could you give me more codes, so that i can be more sure of what you mean. Like that i have to import and the declarations i need to make. Thanks a lot. ^^


Jimbo
Avatar of jimboVB

ASKER

do i need to declare 'help' before i use this code?

help.showhelpindex(me,"helpURL")

could you give me more codes, so that i can be more sure of what you mean. Like that i have to import and the declarations i need to make. Thanks a lot. ^^


Jimbo
help is already imported. so no need to do any other declarations. just replace "helpURL" with your help file path.
Avatar of jimboVB

ASKER

Wow! Thx a lot for helping! i've waited a week for an answer, and i thought it would be very difficult, cuz no one gave me a reponse or comment.. Thanks a lot again!

one more qn, the codes you gave me opens up the help index, if possible i want to open up the help contents instead of the index, what should i do?


Jimbo
Avatar of jimboVB

ASKER

thx for the answer appari! really appreciate that, here's the point.. ^^

Jimbo

p.s hope you could solve for me the last little problem
Avatar of jimboVB

ASKER

nvm appari, i've got the solutions,

help.showhelp(me,"helpURL")

just remove the 'index'... thx anyways

here's some more points for appreciation.. ^^

https://www.experts-exchange.com/questions/20482526/Nobody's-helping.html

Jimbo