How to set ActiveX property?

Post Reply
Max HK
Posts: 23
Joined: Wed Oct 15, 2008 1:04 pm

How to set ActiveX property?

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to set ActiveX property?

Post 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"
regards, saludos

Antonio Linares
www.fivetechsoft.com
Max HK
Posts: 23
Joined: Wed Oct 15, 2008 1:04 pm

Re: How to set ActiveX property?

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to set ActiveX property?

Post by Antonio Linares »

Max,

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

http://forums.fivetechsupport.com/viewt ... y+enhanced
regards, saludos

Antonio Linares
www.fivetechsoft.com
Max HK
Posts: 23
Joined: Wed Oct 15, 2008 1:04 pm

Re: How to set ActiveX property?

Post by Max HK »

Thanks.

But the module FiveHC.lib in www.mediafire.com did not exist. Please upload it again.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to set ActiveX property?

Post by Antonio Linares »

Max,

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

Antonio Linares
www.fivetechsoft.com
Max HK
Posts: 23
Joined: Wed Oct 15, 2008 1:04 pm

Re: How to set ActiveX property?

Post by Max HK »

Antonio,

Yes, I have re-linked the new ActiveX.obj, but the error "Unresolved external '_HB_FUN_ACTXEND'" occurs.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How to set ActiveX property?

Post by Antonio Linares »

Max,

Use a dummy function for a test:

Code: Select all

function ACTXEND()

return nil
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
Max HK
Posts: 23
Joined: Wed Oct 15, 2008 1:04 pm

Re: How to set ActiveX property?

Post by Max HK »

Antonio,

Yes, it works. Thanks for your support.
Post Reply