Multiple ActiveX support

Multiple ActiveX support

Postby Antonio Linares » Fri Mar 30, 2007 2:11 pm

Some users required to simultaneously use several ActiveX controls.

Here it is a working sample:
Code: Select all  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Multiple ActiveX support

Postby Maurilio Viana » Fri Mar 30, 2007 6: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?

Code: Select all  Expand view
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
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil

Postby Antonio Linares » Fri Mar 30, 2007 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sat Mar 31, 2007 8:43 am

Well, in fact that syntax is available in FWH 7.01 :-), so now the sample looks this way:
Code: Select all  Expand view
// 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
Antonio Linares
Site Admin
 
Posts: 42078
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Maurilio Viana » Mon Apr 02, 2007 11:06 am

Very good!
Thanks a lot, Antonio!

Regards,
Maurilio
User avatar
Maurilio Viana
 
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests