[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2005-04-13
6
Medium Priority
?
242 Views
Last Modified: 2010-04-05
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
0
Comment
Question by:Jackson_62
5 Comments
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 2000 total points
ID: 13775558
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
0
 

Author Comment

by:Jackson_62
ID: 13775640
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 ?

0
 
LVL 5

Expert Comment

by:Voodooman
ID: 13777138

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

0
 
LVL 14

Expert Comment

by:cwwkie
ID: 16412396
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.
0
 
LVL 14

Expert Comment

by:cwwkie
ID: 16412398
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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question