Hi John
I do this using a "preferences file". Following is an "abridged" version of the
controlling program that I use in teaching my GIS students at Monash University
. The basic idea is that from a preferences menu, the user can set the location
of the html viewer, & from the individual prctical menu the students can view
the practical text in HTML, load datasets & view lotus screencam animations of
the exercise they are about to undertake. The code is not as slick as it could
be, but it serves the purpose well. If you're interested I could send more...
Good Luck
Ian Allan
Declare Sub MainMapInfoPracs
Declare Sub SetHtml
Global gsRootDirectoryPath,gsHtmlViewer,gsFromDirectory As String
'************************************************************************************
Sub MainMapInfoPracs
'************************************************************************************
gsRootDirectoryPath = Left$(ApplicationDirectory$(),
Len(ApplicationDirectory$())-7) ' - 12)
Open Table ApplicationDirectory$() + "Preferences.tab" Interactive Hide
Fetch First from Preferences
gsHtmlViewer = Preferences.HTMLviewer
gsFromDirectory = Preferences.CurrentlyInstalledPrac
If gsHtmlViewer = "" then
Note "Warning: No HTML viewer has been set."+Chr$(10)+
"The practical text in HTML format cannot"+Chr$(10)+
"be viewed until you do this."+Chr$(10)+Chr$(10)+
"Go to the preferences menu and set"+Chr$(10)+
"the location of your HTML viewer."
End If
End Sub
'************************************************************************************
Sub SetHtml
'************************************************************************************
gsHTMLviewer = FileOpenDlg("","","exe","Select the executable for your HTML
viewer")
If CommandInfo(CMD_INFO_DLG_OK) then
If gsHTMLviewer > "" then
If FileExists(ApplicationDirectory$() + "Preferences.tab") then
Close Table Preferences Interactive
Open Table ApplicationDirectory$() + "Preferences.tab" Interactive Hide
End If
Update Preferences Set HTMLviewer = gsHTMLviewer where rowid = 1
Commit Table Preferences
End If
End If
End Sub
[EMAIL PROTECTED] wrote:
> mapbasic 5.5
>
> I have looked at it for a few hours and now I thought I would ask for help.
> TIA
>
> I can call a www page from MapInfo. I have added a button to our application
> HELP with a button that calls the following.
>
> Run Program "C:\Program Files\Netscape\Communicator\Program\netscape.exe
> www.mapinfo.com"
> will work, however its poor code.
>
> I don't want to ask the user the location of the browser.
>
> If I knew how NT/Win9x used the START -> RUN (try it, just type in the URL
> and it works) then I may be able to call that method.
>
> I even had a go at calling shortcuts to the browser / page .....
>
> I don't want to write code to find the default browser.
>
> TIA
>
> cu
> john
>
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]