• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1465
  • Last Modified:

Delphi 2007 for Win32 Professional - ActiveX forms in web page

A few years/version ago Delphi had an option that allowed creating "Active Forms"; basically an ActiveX object that could be embedded in a web page. Can somebody provide a simple "Hello World" example for Delphi 2007 for Win32 Pro?

0
mtasking
Asked:
mtasking
1 Solution
 
developmentguruCommented:
File | New | Other - Delphi Projects | ActiveX - ActiveX Library
File | New | Other - Delphi Projects | ActiveX - ActiveForm

Then just place a label on the form with the text "HELLO WORLD!" on your active form.

----------------------------------------------------
Displaying it on a web page
use the following HTML (replacing the GUID with the one Delphi generates for you as CLASS_XXX in your type library file)
----------------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
      <title> Delphi ActiveX Test Page </title>
  </head>

  <body>
      <P/>

      You should see your Delphi forms or controls embedded in the form
      below.

      <HR/>

      <CENTER/>

      <P/>

      <OBJECT
       classid="clsid:08D66E1A-1537-4512-8BCF-3133BB6C6D18"
       codebase="c:/projects/ExpertsExchange/ActiveForm/ActiveFormTest.ocx#version=1,0,0,0"
       width=350
       height=250
       align=center
       hspace=0
       vspace=0
      >
      </OBJECT>
  </body>
</html>

You must register your active form (Run | Register ActiveX Server).

In order to hit F9 to test you need to set internet explorer as the application and set the parameter to your HTML page.  You will also need to have popups allowed (my browser tried to block it.  I hit "Allow blocked content" and it worked fine).

Let me know if you need more.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now