Is it possible to create an activex COM wrapper around a current EXE application

We are utilizing a new development product (LANSA) and we would like to call up our existing DELPHI applications within the framework.  Because it is currently an EXE application, it only brings up a new window with the application.  Our consultant tells us that if we can create a COM activex wrapper around the application, we could call it within the framework (basically like a browser).

is this possible without beating the heck out of the current application - basically make it seamless to the existing product

any help would be greatly appreciated
Jackson_62Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BlackTigerXCommented:
here's an article about that:

http://pweb.netcom.com/~cherrman/cvtforms.htm

basically you create a new ActiveForm, and create your current form inside this new ActiveForm... done

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jackson_62Author Commented:
Blacktigerx

so even though this is one big MDI application , we can encapsulate this ina new parent form and thus be able to call the application from within the browser ?

VoodoomanCommented:

Hi

Just watching, I know what BTX is saying but there are lots of problems around all this - not the least that msgboxes and modal forms don't work because IE allows them to drop behind the browser when the browser gets the focus.

Comment only - interested watcher!

Voodooman

cwwkieCommented:
For future reference, a copy of http://pweb.netcom.com/~cherrman/cvtforms.htm, in case it is not available in the future:

Converting a standard Delphi Form to an ActiveForm

By Conrad Herrmann, 25 July 1997

People ask me this question often, and there are several techniques that can do this. The technique that I prefer is easy to learn and the most flexible. In this technique, you make your existing Delphi form a child window of an otherwise ActiveForm. Because it’s a child form, you’ll have to add code to set some of its properties to reflect that fact—to remove the window frame, to align it to its parent’s client area, etc.

This approach has several advantages. The first advantage is that its easy to get up and running—the only thing you need to do that’s not already done for you is to add code to create and embed your form in the ActiveForm. Another advantage is that unlike copying your code to the ActiveForm’s implementation file, this approach doesn’t change your form’s implementation at all. The code you’re familiar with is still familiar. It also means the form’s implementation unit can still be included in a regular Delphi application if you so desire.

Steps to convert a Delphi form to an ActiveForm:

   1. Create a blank ActiveForm.
   2. In the form’s property inspector, add an Create handler like the one shown below:


      Procedure TActiveForm1.FormCreate(Sender: TObject);
      begin
      // This code creates a child form that is just a normal
      // Delphi TForm.
      // This allows the form to be shown both as a normal
      // VCL form and as an ActiveForm.
      ChildForm := TForm1.Create( Self );
      ChildForm.Parent := Self;
      ChildForm.Align := alClient;
      ChildForm.BorderStyle := bsNone;
      ChildForm.Visible := True;
   3. end; In the uses clause, add a reference to your form’s unit (in this case, Unit1).
   4. Add the form’s implementation unit to the project (in this case, Unit1.pas).
   5. Add the declaration of ChildForm to your TActiveForm1 class, like this:


      type
      TActiveForm1 = class ...
      ....
      public
      ChildForm: TForm1;
      ....
      end;
   6. Compile and test your form.
cwwkieCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: BlackTigerX {http:#13775558}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

cwwkie
EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.