🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.borlanddelphi
Article #2

Re: Adding non-visual components to DLLs

#2
From: J.B
Date: Wed, 16 Feb 2000 00:00
31 lines
2486 bytes
Just declare the object you want to add, and create it,
for instance, if you you have a procedure called MyProc, you want to create a TTable inside it, and assign to the
BeforePost event, do it as follows:

Procedure MyProc (event : TEventNotify);
Var
  MyTable : TTable
Begin
  MyTable := TTable.Create(Application);
  Try
    MyTable.BeforePost := event;
  Finally
    MyTable.Free //I have to free it here,
                          // since I don't have any refernce to it out side the proc  !!!
  End;
End;

If you need the ttable outside the proc, define it BEFORE the proc, and free it when you need to free it (like ..., on
finalization of a DLL)
hope that helps
JB


Christopher Voth wrote:

> Hello
> I want to add a non-visual component to a DLL.  Can anyone tell me how to do
> this and assign event handlers.  I am having trouble doing this without the
> object inspector and a form to drop it onto.
> Thank you
> Chris
Technical Details
Message-ID: <38AB20D4.E8D5E112@netzero.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <beAq4.180$j67.56151@typhoon2.gnilink.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 108890,add424d2ce241ab2
X-Google-Attributes: gid108890,public
X-Google-Thread: 104e31,add424d2ce241ab2
X-Google-Attributes: gid104e31,public
X-Google-Thread: fb362,add424d2ce241ab2
X-Google-Attributes: gidfb362,public
X-Google-Thread: fd817,add424d2ce241ab2
X-Google-Attributes: gidfd817,public
X-Google-Thread: 1043cf,add424d2ce241ab2
X-Google-Attributes: gid1043cf,public
X-Google-Thread: f973d,add424d2ce241ab2
X-Google-Attributes: gidf973d,public
X-Google-Thread: 109d99,add424d2ce241ab2
X-Google-Attributes: gid109d99,public
X-Google-Thread: 145512,add424d2ce241ab2
X-Google-Attributes: gid145512,public
From: "J.B" <joecocker@netzero.net>
Subject: Re: Adding non-visual components to DLLs
Date: 2000/02/16
Message-ID: <38AB20D4.E8D5E112@netzero.net>
X-Deja-AN: 586701325
Content-Transfer-Encoding: 7bit
References: <beAq4.180$j67.56151@typhoon2.gnilink.net>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@verio.net
X-Trace: iad-read.news.verio.net 950739129 206.239.115.46 (Wed, 16 Feb 2000 22:12:09 GMT)
Organization: Verio
MIME-Version: 1.0
Reply-To: joecocker@netzero.net
NNTP-Posting-Date: Wed, 16 Feb 2000 22:12:09 GMT
Newsgroups: alt.comp.lang.borlanddelphi,alt.comp.lang.borland-delphi,alt.lang.delphi,borland.public.delphi.internet,borland.public.delphi.objectpascal,comp.lang.pascal.delphi,comp.lang.pascal.delphi.components,comp.lang.pascal.delphi.components.misc,comp.lang