Adsense Ad

Thursday, 1 February 2018

How to Create Browser / Open HTML file in same form in Oracle Forms 6i

In forms 6i, you can use an OCX object to navigate to an HTML page.
The following steps may help you in doing so:

in your form, insert an OCX element

right-click on this object and click on "Insert Object"

choose "Microsoft Web Browser" from the list. The object is now inserted.

in forms menu bar, go to Programs --> Import OLE Library Interfaes.

from the list, under OLE classes, choose Shell.Explorer.2 and under method packages, choose IWebBrowser2 then click OK. Now, a new package is added to your program units.

in the appropriate trigger, write the following code:

declare 
 handlehtml ole2.obj_type;
BEGIN 
 synchronize;
 handlehtml := ole2.create_obj('Shell.Explorer.2');
 handlehtml := forms_ole.get_interface_pointer ('<block_name>.<ocx_name>'); Shell_IWebBrowser2.NAVIGATE(handlehtml,'<URL>'); 
END;


run your form, and fire the trigger where you have written the code, the page specified in <URL> will be displayed in the OCX element.


1 comment:

Anwarul Kabir Khan said...

Hi,
Nice post. Have you any idea to do this in Forms 12c?