Windows Explorer in a MDI-Window ?

Post Reply
User avatar
NK
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany
Contact:

Windows Explorer in a MDI-Window ?

Post by NK »

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

Post by Antonio Linares »

Norbert,

Please try this sample:

Code: Select all

#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
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
NK
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany
Contact:

Post by NK »

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
Post Reply