lundi 22 octobre 2018

How to Open HTML file

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

  1. in your form, insert an OCX element
  2. right-click on this object and click on "Insert Object"
  3. choose "Microsoft Web Browser" from the list. The object is now inserted.
  4. in forms menu bar, go to Programs --> Import OLE Library Interfaes.
  5. 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.
  6. 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;
    
  7. 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.

0 commentaires:

Enregistrer un commentaire

 
;