contents.gifindex.gifprev1.gifnext1.gif

WEB-BROWSER Control

Starting with Version 4.3, 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 3.0 and later (this control is designed for Windows 95, 98, and NT users only). For instance, the WEB-BROWSER control lets you:

int90002.gif Facilitate seamless Web browsing from your COBOL application

int90002.gif Display Web pages containing HTML, scripting, ActiveX controls and Java applet content

int90002.gif Display HTML pages distributed with your COBOL application

int90002.gif Include a variety of graphical and multimedia file types in your COBOL application

int90002.gif Invoke e-mail, telnet, and FTP services from your COBOL application

int90002.gif Display word processing, accounting, or presentation documents from your COBOL application

int90002.gif Display Windows objects such as folders and files from your COBOL application

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.

Note: Your users must have MS IE on their machine in order for the control to work.

You specify the resource using standard URL naming conventions with any protocol that MS IE recognizes, such as http:, ftp:, mailto:, file:, or javascript:.

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 had included:

DISPLAY WEB-BROWSER, VALUE "mailto:info@acucorp.com".

then your application would lauch your user's default e-mail program and create a new message with the "To:" field prefilled. This would allow 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 the ACUCOBOL-GT User Interface Programming Guide.

To view a sample program using the WEB-BROWSER control, click here.