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?

mtaskingAsked:
Who is Participating?
 
developmentguruPresidentCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.