Solved

Ole stuff

Posted on 1998-02-16
3
243 Views
Last Modified: 2010-05-18
Hi there,

I want to make my app an ole server like msword (word.basic) so users can use my app within other programs

now the question: how do i do this, i have looked in the manuals but i don't get it. all i ask is an simple example.

something like:

an application that can be closed, restored, minimized, and execute a function using ole BUT also normal buttons.

Best regards,

Arijan
0
Comment
Question by:aluiken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1359319
Some thing from the net :

OLE Tester

From: johan@lindgren.pp.se

This is a VERY simple test that I made myself to get started with OLE. I was asked to add OLE support to a program I made and this is what I did to have a
program to test that my own OLE server worked.

This creates the oleobject upon creation and then whenever you press a button it calls a procedure in the oleserver.



unit oletestu;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
     ttsesed : variant;
  end;

var
  Form1: TForm1;


implementation
uses oleauto;
{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
  ttsesed := createoleobject('ttdewed.ttsesole');
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ttsesed.openeditfile;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ttsesed.appshow;
end;

end.

Is this good enough, or do you need more? I don't think it can be simpler.
0
 
LVL 1

Author Comment

by:aluiken
ID: 1359320
I have the idea this is an ole client i want to create a server.
0
 
LVL 4

Accepted Solution

by:
d003303 earned 100 total points
ID: 1359321
In D2, say File->New->Automation Object and go through the wizard. In the automated section of the created object you put all procedures that can be called from an OLE client. Register your app by running it once.
In the client, you call your OLE server by CreateOLEObject with the ProgID in the Register procedure of the server. Use the methods in the automated section, that's it.

In D3, the process is mainly the same, but you have to write your own type library. This is documented in the Developers Guide.

Slash/d003303
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

623 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