Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Dec 13, 2017 9:53 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: VB6 help links convert to RB
PostPosted: Wed May 23, 2012 7:58 pm 
Offline
User avatar

Joined: Sat Jun 04, 2011 8:29 am
Posts: 387
Hi
In VB6 we link into help file main contents with:

With hHelp
.CHMFile = App.Path & "\MyHelpFile.chm"
.HHWindow = "Main"
.HHDisplayContents
End With


on specific topics using this code:

Sub launchHelp(sTopic As String)

With hHelp
' leave help in App Path - dont change
.CHMFile = App.Path & "\RetirementPlannerHelp.chm"
.HHWindow = "Main"
If NumCharactersInString(sTopic) > 2 Then
.HHTopicURL = sTopic + ".htm"
Else
.HHTopicURL = "Index.htm"
End If
.HHDisplayTopicURL
End With
End Sub

Any ideas how to do that in RB?

And an even bigger question is how to do this on the mac?
Can I use a .chm file on a mac? If not, what do I use?

I searched the forums for "help file" and could not find anything.

-T

_________________
Currently using:
Windows XP Pro SP3
Real Studio 2011 Release 4.3 Enterprise
and
Mac OS 10.7.4
Real Studio 2011 Release 4.3 Enterprise
(finally also compiled on Mac)


Last edited by torrid on Thu May 24, 2012 7:25 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: VB6 help links convert to RB
PostPosted: Wed May 23, 2012 10:22 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
There are chm readers for Mac

Not quite sure how to get the exact help topic to show.. But to load the CHM

Dim xHelp as FolderItem

xHelp = GetFolderItem("myhelpfile.chm")
xHelp.Launch

Replacing myhelpfile with your file and location using GetFolderItem. Will do some research :-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
Reply with quote  
 Post subject: Re: VB6 help links convert to RB
PostPosted: Thu Jun 14, 2012 4:09 pm 
Offline
User avatar

Joined: Sat Jun 04, 2011 8:29 am
Posts: 387
Anyone figure out how to launch the CHM help file to a specific topic in the file from RB????


Top
 Profile  
Reply with quote  
 Post subject: Re: VB6 help links convert to RB
PostPosted: Thu Jun 14, 2012 6:13 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Here is one way.
dim helpfile as string = "myhelpfile.chm"
dim startsection as string = "section1"
dim f as folderitem
dim URL as MemoryBlock

Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (hwnd as Integer, _
url as Ptr, command as Integer, data as integer) as Integer

f = GetFolderItem(helpfile)
URL = new MemoryBlock(LenB(f.AbsolutePath)+lenb(startsection)+21)
URL.CString(0) = f.AbsolutePath + "::/" + startsection + ".html"
call HTMLHelp(0, URL, 0, 0)


Top
 Profile  
Reply with quote  
 Post subject: Re: VB6 help links convert to RB
PostPosted: Tue Jun 19, 2012 11:25 pm 
Offline
User avatar

Joined: Sat Jun 04, 2011 8:29 am
Posts: 387
well Tim hare... why didn't I think of that? :)

OK so there is not an easy native RB way to do it...

Follow up... do I then have to install hhctrl.ocx or is that assumed to be installed on every windows machine including XP, Vista, Windows 7?


Top
 Profile  
Reply with quote  
 Post subject: Re: VB6 help links convert to RB
PostPosted: Tue Jun 19, 2012 11:55 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
It should be there as far as I know.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group