Página 1 de 1
Can an Xailer form contain an ActiveX form?
Publicado: Lun Abr 01, 2013 7:22 pm
por Guest
Hi,
I have a third party component, which is embeddable in a form, in other environments, but am not able to get it working with Xailer, so far.
I ran the Import ActiveX menu, to generate a class. But cannot figure a way to embed it.
Is it possible that Xailer has no support for such embeddable controls?
Can an Xailer form contain an ActiveX form?
Publicado: Lun Abr 01, 2013 7:42 pm
por ignacio
DGauss escribió el lun, 01 abril 2013 19:22Hi,
I have a third party component, which is embeddable in a form, in other environments, but am not able to get it working with Xailer, so far.
I ran the Import ActiveX menu, to generate a class. But cannot figure a way to embed it.
Is it possible that Xailer has no support for such embeddable controls?
Do something like this:
METHOD FormInitialize( oSender ) CLASS TForm1
WITH OBJECT TMyOcx():New( ::oBevel1 )
:nAlign := alClient
:Create()
END WITH
RETURN Nil
Note that oBevel1 is an already created TBevel control on the form.
Regards,
Can an Xailer form contain an ActiveX form?
Publicado: Mar Abr 02, 2013 1:18 pm
por Guest
Negative. Previously, the initial code was this:
::oRep := TRoc():New( Self )
::oRep:Create()
::oRep:RepSetLicenseKey( "XXXX-XXXX-XXXX" )
::oRep:DesignMode := FALSE
::oRep:InWebRep := FALSE
::oRep:Standalone := TRUE
::oRep:Toolbar := TRUE
, and it was possible to access most of the methods. But the ocx component just didn't show up.
When the code is changed, according to suggestions, to
::oRep := TRoc():New( ::bvlReportWriter )
::oRep:nAlign := alClient
::oRep:Create()
::oRep:RepSetLicenseKey( "XXXX-XXXX-XXXX" )
::oRep:DesignMode := FALSE
::oRep:InWebRep := FALSE
::oRep:Standalone := TRUE
::oRep:Toolbar := TRUE
, there's an error message during the execution of the Create() method,
No exported method: GETNEWID
Can an Xailer form contain an ActiveX form?
Publicado: Mar Abr 02, 2013 2:33 pm
por ignacio
>>::oRep := TRoc():New( ::bvlReportWriter )
This seems to be incorrect. The parameter should be 'Self' or a control container. So:
::oRep := TRoc():New( Self )
Regards,
Can an Xailer form contain an ActiveX form?
Publicado: Mar Abr 02, 2013 3:38 pm
por Guest
Also, tried these 2, same result:
Local oRep
WITH OBJECT TRoc():New( ::bvlReportWriter )
:nAlign := alClient
:Create()
END WITH
********************************
oRep := TRoc():New( ::bvlReportWriter )
oRep:nAlign := alClient
oRep:Create()
oRep:RepSetLicenseKey( "XXXXX-XXXXX-XXXXX" )
oRep:DesignMode := FALSE
oRep:InWebRep := FALSE
oRep:Standalone := TRUE
oRep:Toolbar := TRUE
Can an Xailer form contain an ActiveX form?
Publicado: Mar Abr 02, 2013 4:38 pm
por ignacio
Please re-read my last message. TIA.
Regards
Can an Xailer form contain an ActiveX form?
Publicado: Mar Abr 02, 2013 5:01 pm
por Guest
ignacio wrote on Tue, 02 April 2013 14:33>>::oRep := TRoc():New( ::bvlReportWriter )
This seems to be incorrect. The parameter should be 'Self' or a control container. So:
::oRep := TRoc():New( Self )
Regards,
Ignacio,
I had responded to this message, prior to adding "Also, tried these 2, same result: Local oRep...", but it looks like it didn't go through. Will try to re-construct that response, here:
The original code used Self as the parameter. It worked as far as being able to access some of the OCX's methods and properties, but it didn't get embedded into the form.
Your example involved a TBevel control. I tried something similar with
oRep := TRoc():New( ::bvlReportWriter )
oRep:nAlign := alClient
oRep:Create()
(::bvlReportWriter is a TBevel control, embedded in the form).
, but it generates the GetNewID No exported method error.
Can an Xailer form contain an ActiveX form?
Publicado: Mié Abr 03, 2013 10:16 am
por ignacio
Hello,
the 'b' instead of a 'o' on the parameter make me mistake. Sorry for that.
I hope you can send us a small sample to reproduce your bug. A demo version of your ActiveX will be also necessary.
Regards,
Can an Xailer form contain an ActiveX form?
Publicado: Mié Abr 03, 2013 11:26 pm
por Guest
Hi Ignacio,
I forwarded a sample to Jose Gimenez.
Thanks.
Regards,
DC
Can an Xailer form contain an ActiveX form?
Publicado: Jue Abr 04, 2013 9:41 am
por jfgimenez
Dwayne,
> I forwarded a sample to Jose Gimenez.
Got it. I'll check it in a while.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
Can an Xailer form contain an ActiveX form?
Publicado: Jue Abr 04, 2013 2:36 pm
por Guest
Jose/Ignacio,
Thanks, man. Working fine.
(Jose responded to my email with the following comments:
You have to instantiate the OCX from the OnInitialite form's event,
not from OnCreate one, since this last one is fired before any control is created.)