Consultor Eletrônico



Kbase P102664: 4GL: How to open a web page or an html file in Microsoft Intenet Explorer?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/26/2008
Status: Verified

GOAL:

4GL/ABL: How to open a Web Page in the Microsoft Internet Explorer web browser?

GOAL:

How to open a specific World Wide Web (www) page from 4GL in the Microsoft Internet Explorer web browser?

GOAL:

How to invoke the WinExec WINDOWS API function from 4GL?

FACT(s) (Environment):

Operating System
Windows
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

The following code invoke the WinExec WINDOWS API function from 4GL to open the Progress main Web Page in the Microsoft Internet Explorer web browser:
DEFINE VARIABLE cProgramName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cPageAddress AS CHARACTER NO-UNDO.
DEFINE VARIABLE iReturnResult AS INTEGER NO-UNDO.
ASSIGN
cProgramName = "C:\Program Files\Internet Explorer\iexplore.exe"
cPageAddress = "http://www.progress.com".
RUN WinExec (INPUT cProgramName + CHR(32) + cPageAddress , INPUT 1, OUTPUT iReturnResult).
PROCEDURE WinExec EXTERNAL "KERNEL32.DLL":
DEFINE INPUT PARAMETER ProgramName AS CHARACTER.
DEFINE INPUT PARAMETER VisualStyle AS LONG.
DEFINE RETURN PARAMETER StatusCode AS LONG.
END PROCEDURE.