Are activeforms meant for web deployment only?


2003-10-02 08:47:21 AM
delphi129
Every book I turn to, every tutorial I have seen on the web, only discusses
active forms in the context of web deployment. I hoped I could design an
active form in Delphi, wrap it in a dll/ocx, and embed it - not in a web
page, but in a host application, also written in Delphi. But there is no
example code that I can find, and in a test app my form won't show up at
all.
What I am trying to do, simply, is:
* declare an interface
* design a form that implements this interface, or have that interface
create a form at runtime (whichever is doable/better)
* host the form on a panel in my main application.
The code in the ocx must have access to the controls and properties of the
ActiveX form, but the host application only needs to display the form in a
"visually integrated" way.
There will be several different ocx forms, each implementing the same
interface. The host app would see what ocx'es it has available, pick the
one it needs and load/show the form. An additional problem here is that the
host application does not know the exact type declaration of each
particular form; it only knows the interface (or, it can know a TForm
descendant type which is an ancestor to all the actual ocx forms).
Is this at all possible? Thanks a lot in advance,
.marek
--
No ads, no nags freeware: www.tranglos.com
(KeyNote, PhoneDeck, KookieJar, Oubliette)