• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

ActiveX Component Expert

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
arnoldu
Asked:
arnoldu
  • 3
1 Solution
 
JimBob091197Commented:
What does your component inherit from?

0
 
arnolduAuthor Commented:
The component is inherited from TComponent - is there a problem with invisible components?
0
 
JimBob091197Commented:
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
 
JimBob091197Commented:
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now