Solved

ActiveX Component Expert

Posted on 1998-05-05
4
222 Views
Last Modified: 2010-04-06
When I try to convert my component to an ActiveX control using the ActiveX expert (New ... ActiveX ... ActiveXControl), my component is not visible in the dropdownlist of VCL components. It is correctly installed and working as normal VCL component though, any ideas?
0
Comment
Question by:arnoldu
  • 3
4 Comments
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1341377
What does your component inherit from?

0
 

Author Comment

by:arnoldu
ID: 1341378
The component is inherited from TComponent - is there a problem with invisible components?
0
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 200 total points
ID: 1341379
Yip.  You can't have anything inherited directly from TComponent.  It must be a control (inherited from TCustomControl, or maybe TControl).

You could try changing it from "TMyWhatsIt = class(TComponent)" to TMyWhatsIt = class(TCustomControl)" and then in the constructor setting the Width & Height to 24, and keeping the Visible property False.  A bit of a work-around, but it should work.

Cheers,
JB
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1341380
According to Delphi's help, a TActiveXControl must be derived from a TWinControl.

"TActiveXControl defines the core behavior and interfaces required of an ActiveX control and connects that behavior to any VCL control derived from TWinControl."

JB
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…

831 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