


ACUCOBOL-GT includes an Internet-related graphical control called WEB-BROWSER. This control broadens the usefulness and scope of your COBOL programs by giving them all of the capabilities of Microsoft Internet Explorer's Web browser control Version 4.0 and later (this control is designed for Windows users only). For instance, the WEB-BROWSER control lets you:
ACUCOBOL-GT's WEB-BROWSER control is used just like any other graphical control in ACUCOBOL-GT, except that it opens a resource such as an HTML page, graphical image, video, audio, e-mail program, file folder or any other resource that a Web browser can open. When you include the WEB-BROWSER control in your source code, your application launches Microsoft Internet Explorer (MS IE) on your user's machine and displays the resource you specified.
For example to display Acucorp's Web page on the user's machine, you might create a WEB-BROWSER control identified by the name BROWSER-1, then add the following lines to a Screen Section item:
03 BROWSER-1 WEB-BROWSER, VALUE "www.acucorp.com"
COLUMN 5, LINE 5, SIZE 60, LINES 20.
or add the following Procedure Division code:
DISPLAY WEB-BROWSER, VALUE "www.acucorp.com"
COLUMN 5, LINE 5, SIZE 60, LINES 20.
You can then close the screen, close the window, or destroy the control like any other ACUCOBOL-GT control.
The VALUE of the WEB-BROWSER control determines which resource to display. Therefore, if you include:
DISPLAY WEB-BROWSER, VALUE "mailto:info@acucorp.com".
your application launches your user's default e-mail program and creates a new message with the "To:" field prefilled. This allows your user to quickly compose and mail a message to the specified address.
The default settings used by MS IE when it performs these Web browser functions (such as the "home page," security options, e-mail program) are included in the user's control panel under the Internet option. Users who want to alter the behavior of the browser controls should modify their control panel Internet settings.
As with any ACUCOBOL-GT control, you can add the WEB-BROWSER control to user interface screens using the AcuBench Screen Painter. The control can be found on the screen design control palette along with the other controls. Click the control, fill in its value clause, and the Screen Painter will show you what the screen will look like to the user.
Your WEB-BROWSER control can be as simple or involved as you like. In its simplest form, the WEB-BROWSER control is activated in a single DISPLAY statement. If desired, you can specify the size and color of the resulting browser window; you can activate the browser control's back, forward, home, and search buttons; or you can capture events such as download progress, status bar text changes or resource title change so you can communicate them to your user.
For information on the methods, properties, events, and event properties of the WEB-BROWSER control, refer to Chapter 3 of ACUCOBOL-GT Book 2: User Interface Programming.
More:
B.2.1 Adding Web Browsing to Your COBOL Applications
B.2.2 Displaying HTML Pages Distributed With Your Application
B.2.3 Including Graphical and Multimedia Files in Your Applications
B.2.4 Invoking e-mail, telnet, and FTP Services From Your Applications
B.2.5 Displaying Word Processing, Accounting, or Presentation Documents From Your Applications