Kent Belan wrote:
> Hello,
> I want to open a website in the users default browser.
>
> Has anyone done this or have some VFP9 code to share ?
>
> Thanks and Merry Christmas,
Just do a ShellExecute:
IF VARTYPE(lcHelpFile) = "C" AND (FILE(lcHelpFile) OR
LEFT(LOWER(lcHelpFile),4) = "http") AND !EMPTY(lcHelpFile) THEN
WAIT WINDOW NOWAIT "Launching help file..."
LOCAL loShell
loShell = NEWOBJECT("_ShellExecute", "_environ.vcx")
loShell.ShellExecute(lcHelpFile) && mjb 01-21-05 added quotes
to cover
for spaces in filename
RELEASE loShell
ELSE && mjb 12-28-04 added IF block to alert user if not found
MESSAGEBOX("Cannot locate help file " +
IIF(!EMPTY(lcHelpFile),"(" +
lcHelpFile + "). ","(no help file set)") + ADMINMSG,16,"Help file not
found.")
ENDIF
You could probably use about:blank for the destination if there is none.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.