Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / July 2004



Tip: Looking for answers? Try searching our database.

How to open a specific topic of an HTML help file from VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric - 27 Jul 2004 18:42 GMT
Hi All,

How do you open a specific topic of an HTML Help file from a VB program?  I
have written .hlp style helpfiles before but am new to writing .chm HTMLHelp
files.

If you wrote the old style .hlp files you could assign a topic ID to each
help topic, map that ID to a number and in a VB program open a specific help
topic with that number using a common dialog control and code like this:

  With CommonDialog1
     .HelpFile = "VB5.hlp"
     .HelpContext = 916302
     .HelpCommand = cdlHelpContext
     .ShowHelp
   End With

As far as I can tell you can't even use a common dialog control to open a
.chm file.  Any suggestions would be appreciated.

Thanks,
Eric
Pete Lees - 28 Jul 2004 19:46 GMT
Eric,

> How do you open a specific topic of an HTML Help file from a VB program?

Here are a few resources that should help:

http://www.smountain.com/m_ProgrammingHelp.htm
http://mvps.org/htmlhelpcenter/htmlhelp/hhvbsmpl.html
http://mvps.org/htmlhelpcenter/htmlhelp/hhvbclas.html

And a lot of additional resources are listed here:

http://www.mshelpwiki.com/index.php?page=HTMLHelpArticles

Signature

Pete (Microsoft Help MVP)

Atreju - 30 Jul 2004 23:52 GMT
>Eric,
>
[quoted text clipped - 9 lines]
>
>http://www.mshelpwiki.com/index.php?page=HTMLHelpArticles

Great resources thanks. I've been meaning to start actually writing
help files for my work.

By the way, if you needed to write a help file - the purpose of which
was to instruct developers on making help files, but you needed help
doing so, and wanted to read up on it on your own, would you look in
the
"Self-Help Help Help" Section?

Haw. Sorry.

---Atreju---
Martin Trump - 31 Jul 2004 16:08 GMT
>would you look in
>the
> "Self-Help Help Help" Section?

Unanswerable question. If I told you it wouldn't be self help ;-)

Regards

Signature

Martin Trump

Geoff - 28 Jul 2004 19:56 GMT
> Hi All,
>
[quoted text clipped - 18 lines]
> Thanks,
> Eric

What Version of Vb you got?
In VB6 HTML Help file support is limited.
VB5 is non existent AFAIK
You need to forget the Common Dialog with HTML.
To extend Vb6 support you can use api to pass the ContextID etc.. yourself.
http://support.microsoft.com/default.aspx?scid=kb;en-us;315988
You can also use api for Whats this help suff if you want some info on that
post back.

Regards G
Eric - 29 Jul 2004 16:36 GMT
Thanks Geoff and Pete Lees!  The links you suggested are exactly what I
needed.  Using essentially the code in KB315988 I've now got my VB6 program
calling the correct pages of the HTMLhelp file.

One problem I haven't fixed yet is that if the help file is still open when
I end the program that called it, then VB6 crashes.  If my program is
compiled to a stand alone exe then the program itself crashes just as I end
it (a little untidy).  Any idea why?

> What Version of Vb you got?
> In VB6 HTML Help file support is limited.
[quoted text clipped - 6 lines]
>
> Regards G
Eric - 29 Jul 2004 19:22 GMT
A thought.  Is it possible that although the lines:

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  Call HtmlHelp(0&, "", HH_CLOSE_ALL, ByVal 0&)
  End
End Sub

close the help window and stop the VB6 program, the help window might not be
finished closing before the program ends, thus causing a crash???

> Thanks Geoff and Pete Lees!  The links you suggested are exactly what I
> needed.  Using essentially the code in KB315988 I've now got my VB6 program
[quoted text clipped - 17 lines]
> >
> > Regards G
Pete Lees - 30 Jul 2004 19:50 GMT
Eric,

> One problem I haven't fixed yet is that if the help file is still open when
> I end the program that called it, then VB6 crashes.  If my program is
> compiled to a stand alone exe then the program itself crashes just as I end
> it (a little untidy).  Any idea why?

See if the tips at http://helpware.net/FAR/far_faq.htm#HH_CLOSE_ALL help.

Signature

Pete (Microsoft Help MVP)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.