FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Multiple ActiveX support
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Multiple ActiveX support
Posted: Fri Mar 30, 2007 02:11 PM
Some users required to simultaneously use several ActiveX controls.

Here it is a working sample:
#include "FiveWin.ch"

function Main()

   local oWnd, oActiveX1, oActiveX2

   DEFINE WINDOW oWnd TITLE "FiveWin multiple ActiveX support"

   oActiveX1 = TActiveX():New( oWnd, "Shell.Explorer" )

   oActiveX1:Move( 10, 10, 220, 220 )

   oActiveX1:Do( "GoHome" )

   oActiveX2 = TActiveX():New( oWnd, "MediaPlayer.MediaPlayer.1" )

   oActiveX2:Move( 10, 240, 220, 220 )

   ACTIVATE WINDOW oWnd

return nil

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Re: Multiple ActiveX support
Posted: Fri Mar 30, 2007 06:00 PM
Thanks Antonio, it came in good time :-)

Maybe you can create a xBase like command to simplify these two lines. What do you think?

oActiveX1 = TActiveX():New( oWnd, "Shell.Explorer" )
oActiveX1:Move( 10, 10, 220, 220 )


DEFINE ACTIVEX oActiveX ENTRY "Shell.Explorer" OF oWnd FROM 10,10 TO 220,220

Regards,
Maurilio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Multiple ActiveX support
Posted: Fri Mar 30, 2007 08:52 PM

Maurilio,

> DEFINE ACTIVEX oActiveX ENTRY "Shell.Explorer" OF oWnd FROM 10,10 TO 220,220

We were thinking about this one:

@ ..., ... ACTIVEX oActivex PROGID "Shell.Explorer" OF oWnd SIZE ..., ...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Multiple ActiveX support
Posted: Sat Mar 31, 2007 08:43 AM
Well, in fact that syntax is available in FWH 7.01 :-), so now the sample looks this way:
// Using several ActiveX simultaneously

#include "FiveWin.ch"

function Main()

   local oWnd, oActiveX1, oActiveX2

   DEFINE WINDOW oWnd TITLE "FiveWin multiple ActiveX support"

   @ 10, 10 ACTIVEX oActiveX1 PROGID "Shell.Explorer" OF oWnd SIZE 220, 220

   oActiveX1:Do( "GoHome" )

   @ 10, 240 ACTIVEX oActiveX2 PROGID "MediaPlayer.MediaPlayer.1" OF oWnd SIZE 220, 220

   ACTIVATE WINDOW oWnd

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Multiple ActiveX support
Posted: Mon Apr 02, 2007 11:06 AM

Very good!
Thanks a lot, Antonio!

Regards,
Maurilio

Continue the discussion