>I have seen some posts from others about this problem and I am writing some new ActiveX components in Delphi. If I code a control in MFC I don't see the problem. However, if I create a control that is based upon a TWINControl in Delphi which gives me a container control, when you test for the _SCREEN.ActiveForm it returns the OLECONTROL rather than the VFP form.
>
>I know you can code to climb up to the top of the form using PARENT but what a pain. So I have been using Spy++ and looking at the Windows Styles and Window Class Styles for controls that work and don't work and have matched the Class Styles which was DC_PARENTDC which wasn't normally used in Delphi but that doesn't fix it either. So then I thought the caption of the control was maybe causing it since the controls that worked didn't have Captions for their Windows properties but nope not that either.
>
>So now I am trying to determine what part of VFP is looking at my OLECONTROL to determine that is the ActiveForm rather than the VFP form.
>
>Any ideas or suggestions of where to look?
>
>TIA
Rich,
If it's any consolation to you, this same problem applies to the MS Toolbar 6.0 control. The workaround, at least for now, is to use _SCREEN.Forms(1) rather than the ActiveForm object. I've never seen an instance where they were different.
George
Ubi caritas et amor, deus ibi est