Page 1 of 1

Multiple ActiveX support

Posted: Fri Mar 30, 2007 2:11 pm
by Antonio Linares
Some users required to simultaneously use several ActiveX controls.

Here it is a working sample:

Code: Select all

#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
Image

Re: Multiple ActiveX support

Posted: Fri Mar 30, 2007 6:00 pm
by Maurilio Viana
Thanks Antonio, it came in good time :)

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

Code: Select all

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

Posted: Fri Mar 30, 2007 8:52 pm
by Antonio Linares
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 ..., ...

Posted: Sat Mar 31, 2007 8:43 am
by Antonio Linares
Well, in fact that syntax is available in FWH 7.01 :-), so now the sample looks this way:

Code: Select all

// 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

Posted: Mon Apr 02, 2007 11:06 am
by Maurilio Viana
Very good!
Thanks a lot, Antonio!

Regards,
Maurilio