FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Windows Explorer in a MDI-Window ?
Posts: 97
Joined: Sun Nov 20, 2005 04:32 PM
Windows Explorer in a MDI-Window ?
Posted: Thu Nov 30, 2006 02:16 PM

Hallo Fivewinners,

is it possible to indicate the windows explorer (File-Explorer) in a MDI window and to purport a certain path?

Via ActiveX ?

Regards, Norbert

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Windows Explorer in a MDI-Window ?
Posted: Fri Dec 01, 2006 05:27 PM
Norbert,

Please try this sample:
#include "FiveWin.ch"

function Main()

   local oWnd, oWndChild, oActiveX
   local cEvents := ""

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" MDI
   
   DEFINE WINDOW oWndChild MDICHILD OF oWnd

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

   oWndChild:oClient = oActiveX // To fill the entire window surface
   oWndChild:Resize()

   oActiveX:Do( "Navigate2", "http://www.fivetechsoft.com" )

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

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

return nil

function EventInfo( event, aParams, pParams, oActiveX )

   local cMsg := "Event: " + cValToChar( event ) + CRLF
   local n
   
   cMsg += "Params: " + CRLF
   
   for n = 1 to Len( aParams )
      cMsg += cValToChar( aParams[ n ] ) + CRLF
   next
   
   if event == "BeforeNavigate2"
      // MsgInfo( aParams[ 2 ] )
      // SetEventParam( pParams, 7, .t. ) // Comment this to allow navigation
   endif   

return cMsg + CRLF

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 97
Joined: Sun Nov 20, 2005 04:32 PM
Windows Explorer in a MDI-Window ?
Posted: Fri Dec 01, 2006 06:28 PM

Antonio,

Thank you very much for the example.

To be sure I did not mean the Internet Explorer, i mean the Windows File Exporer.

Do you have for that also an example?

Regards Norbet

Continue the discussion