Page 1 of 1

Tactivex BUG

Posted: Fri Sep 01, 2006 9:26 pm
by Silvio
Try this code :

Code: Select all

#include "FiveWin.ch"

function Main()

   local oWnd, oActiveX
   local cEvents := ""

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

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

   oWnd:oClient = oActiveX // To fill the entire window surface

   *oActiveX:Do( "GoHome" )
    oActiveX:Do( "Navigate", "http://www.fivetechsoft.com" )

   oActiveX:SetProp( "StatusBar", .T. )       // not run ???
   oActiveX:SetProp( "AddressBar", .T. )     // not run ???
   oActiveX:SetProp( "ToolBar", .T. )         // not run ???
   oActiveX:SetProp( "LinksBar", .T. )         // not run ???
   oActiveX:SetProp( "ToolbarOptions", .T. )    // not run ???

   MsgInfo( oActiveX:GetProp( "StatusBar" ) )     // .t.
   MsgInfo( oActiveX:GetProp( "AddressBar" ) )    //  .t.
   MsgInfo( oActiveX:GetProp( "ToolBar" ) )       //  -1
   MsgInfo( oActiveX:GetProp( "LinksBar" ) )      //   nil
   MsgInfo( oActiveX:GetProp( "ToolbarOptions" ) )     // nil



   oActiveX:bOnEvent = { | event, aParams | cEvents += EventInfo( event, aParams ) }

   ACTIVATE WINDOW oWnd ;
      VALID ( MemoEdit( cEvents ), .t. )

return nil

function EventInfo( event, aParams )

   local cMsg := "Event: " + cValToChar( event ) + CRLF
   local n

   cMsg += "Params: "

   for n = 1 to Len( aParams )
      cMsg += cValToChar( aParams[ n ] ) + CRLF
   next

return cMsg + CRLF



this properties are not visible :

oActiveX:SetProp( "StatusBar", .T. ) // not run ???
oActiveX:SetProp( "AddressBar", .T. ) // not run ???
oActiveX:SetProp( "ToolBar", .T. ) // not run ???
oActiveX:SetProp( "LinksBar", .T. ) // not run ???
oActiveX:SetProp( "ToolbarOptions", .T. ) // not run ???

why ?

I try also with Shell.Explorer.2

Regards,

Posted: Fri Sep 01, 2006 10:29 pm
by Antonio Linares
Silvio,

It does not seem as a Class TActiveX bug. Somehow the Explorer activex is not allowing the management of those properties.

Have you tried it from another programming language that manages ActiveX like VB, Delphi, etc. ?

Posted: Sat Sep 02, 2006 11:29 am
by Silvio
Yes i try with C3 with shell.Explorer.2
In c3 ( activex3 project) you can see the address bar ....
http://www.c3compiler.com/Archivos/ActiveX3.zip

I not found sample in another language but I go to winguide and I found I can set the property VIA REGISTer
http://www.winguides.com/registry/display.php/1111/

have you another Idea ?
why I cannot use SetProp( ) method ?

Posted: Tue Sep 05, 2006 6:11 am
by Antonio Linares
Silvio,

That C3 sample does not use the ActiveX built-in statusbar neither the toolbar.