Windows Explorer in a MDI-Window ?

Windows Explorer in a MDI-Window ?

Postby NK » Thu Nov 30, 2006 2: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
User avatar
NK
 
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany

Postby Antonio Linares » Fri Dec 01, 2006 5:27 pm

Norbert,

Please try this sample:
Code: Select all  Expand view
#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
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby NK » Fri Dec 01, 2006 6: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
User avatar
NK
 
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests

cron