Page 1 of 1

How to set ActiveX property?

Posted: Mon Oct 19, 2009 6:59 pm
by Max HK
I want to use an ActiveX.

In VB6, I use these ways to set properties:
1. oGrid1.Cols = 27
2. oGrid1.Font.Name = "Arial"
3. oGrid1.Column(2).Width = 20
4. oGrid1.Cell(0,1).Text = "Item Code"

In FWH, I know oGrid1:SetProp( "Cols", 27) to set property, but do not know how to assign others (2 to 4).

Thanks.

Re: How to set ActiveX property?

Posted: Mon Oct 19, 2009 7:41 pm
by Antonio Linares
Max,

From FWH 9.05 on you can use:

1. oGrid1:Cols = 27
2. oGrid1:Font:Name = "Arial"
3. oGrid1:Column(2):Width = 20
4. oGrid1:Cell(0,1):Text = "Item Code"

Re: How to set ActiveX property?

Posted: Tue Oct 20, 2009 3:47 pm
by Max HK
Antonio,

Thanks for your reply.

But I am using FWH9.01, how to do these settings?

In addition, I know there are different ways to use ActiveX:
1. TActiveX():New( oWnd, cProgID, nTop, nLeft, nBottom, nRight )
2. CreateObject( cProgID )
3. TOLEAuto():New( cProgID )

What are differences between these ways? If use CreateObject() or TOLEAuto(), how to set coordinates?

I have tried TActiveX() to create Excel and Word but Application Exception occurs. And not every 3rd parties VB ActiveX can be created by TActiveX.

Regards

Re: How to set ActiveX property?

Posted: Tue Oct 20, 2009 6:21 pm
by Antonio Linares
Max,

Please try it again using these enhancements that we did on Class TActiveX:

http://forums.fivetechsupport.com/viewt ... y+enhanced

Re: How to set ActiveX property?

Posted: Wed Oct 21, 2009 10:50 am
by Max HK
Thanks.

But the module FiveHC.lib in www.mediafire.com did not exist. Please upload it again.

Re: How to set ActiveX property?

Posted: Wed Oct 21, 2009 12:12 pm
by Antonio Linares
Max,

You just need to compile the published activex.prg in that post and link the resulting OBJ to your application

Re: How to set ActiveX property?

Posted: Wed Oct 21, 2009 2:43 pm
by Max HK
Antonio,

Yes, I have re-linked the new ActiveX.obj, but the error "Unresolved external '_HB_FUN_ACTXEND'" occurs.

Re: How to set ActiveX property?

Posted: Wed Oct 21, 2009 4:35 pm
by Antonio Linares
Max,

Use a dummy function for a test:

Code: Select all

function ACTXEND()

return nil
 

Re: How to set ActiveX property?

Posted: Thu Oct 22, 2009 1:29 pm
by Max HK
Antonio,

Yes, it works. Thanks for your support.