Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Aug 17, 2018 2:47 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Adding Help To RS App
PostPosted: Fri Mar 22, 2013 12:08 pm 
Offline

Joined: Fri Mar 22, 2013 11:33 am
Posts: 14
Just started using RS. Can anyone tell me what is the best way to add user help (via the Help Menu) to an RS app? Can .chm help file form a Windows app be used, and if so, how is this done?


Top
 Profile  
Reply with quote  
 Post subject: Re: Adding Help To RS App
PostPosted: Fri Mar 22, 2013 1:07 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
There are any number of ways of doing this. Some people just add a text, pdf, or html files into the bundle (mac) or resources directory (win/linux) and find the file and launch it via a folderitem. Some will create Apple Help files or CHM files and do the proscribed way of calling them in their respective platforms.

You can create cross platform Help Files from one source using Simple Help Editor which can be found at http://www.bkeeney.com/simple-help-editor/

This is some code I have to launch Window Help:

Private Function ShowWinHelp(pagePath as String, parentWin as window, file As String = "") As Boolean
#if TargetWin32
dim f as FolderItem
dim winHandle as Integer
dim theURL as MemoryBlock

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

if file = "" Then
f = GetFolderItem("Resources").child("MyWindowsHelp.chm")
Else
f = GetFolderItem("Resources").child(file)
End If

if f is nil or not f.Exists Then
Return False
end if

if parentWin is nil then
winHandle = GetDesktopWindow
Else
winHandle = parentWin.Handle
end if

if pagePath = "" Then pagePath = "index.htm"

theURL = new MemoryBlock(LenB(f.AbsolutePath)+lenb(pagePath)+16)
theURL.CString(0) = f.AbsolutePath+"::/"+pagePath

Return HTMLHelp(winHandle, theURL, 0, 0) <> 0
#endif

End Function

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Adding Help To RS App
PostPosted: Fri Mar 22, 2013 3:25 pm 
Offline

Joined: Fri Mar 22, 2013 11:33 am
Posts: 14
Thanks for your info. I will try some of your suggestions.


Top
 Profile  
Reply with quote  
 Post subject: Re: Adding Help To RS App
PostPosted: Wed Apr 10, 2013 2:08 pm 
Offline

Joined: Sat Dec 04, 2010 9:14 pm
Posts: 918
Is there a best method to launch an Html file (index.html)?

Tim


Top
 Profile  
Reply with quote  
 Post subject: Re: Adding Help To RS App
PostPosted: Wed Apr 10, 2013 2:17 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
If it's Local...

Dim myHelpFile as FolderItem

myHelpFile = GetFolderItem("index.html")

myHelpFile.Launch

If it's online....

ShowURL "http://www.mydomain.com/helpfile.html"

_________________
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: Adding Help To RS App
PostPosted: Wed Apr 10, 2013 2:31 pm 
Offline

Joined: Sat Dec 04, 2010 9:14 pm
Posts: 918
Thanks simulanics!
Tim


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group