Multiple ActiveX support

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Multiple ActiveX support

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

Antonio Linares
www.fivetechsoft.com
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Re: Multiple ActiveX support

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

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

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

Antonio Linares
www.fivetechsoft.com
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Post by Maurilio Viana »

Very good!
Thanks a lot, Antonio!

Regards,
Maurilio
Post Reply