Launch External Application from GUI

Status
Not open for further replies.

chrisw669

New Member
I'm trying to create a button that when clicked will launch an internet explorer session with a url passed from progress.

I got this working successfully using the ActiveX (OCX) plugin but my problem is the web-based application i'm accessing won't set the security up right when using the OCX.
 
Stick this in your definitions section:

/* THIS IS FOR OS-COMMAND FUNCTIONALITY WITH UNC PATHS */
PROCEDURE ShellExecuteA EXTERNAL "shell32" :
define input parameter hwnd as long.
define input parameter lpOperation as char.
define input parameter lpFile as char.
define input parameter lpParameters as char.
define input parameter lpDirectory as char.
define input parameter nShowCmd as long.
define return parameter hInstance as long.
END PROCEDURE.


And stick this where you want to open up the URL (replace YOUR-URL-VARIABLE-OR-TEXT-STRING with whatever you want):

DEFINE VARIABLE DUMMY AS INTEGER NO-UNDO.
RUN ShellExecuteA IN THIS-PROCEDURE
(0,
"open",
YOUR-URL-VARIABLE-OR-TEXT-STRING,
"",
"",
1,
OUTPUT DUMMY).
This will open up the URL in whatever their default browser is.
Wes
 
Status
Not open for further replies.
Back
Top