Page 1 of 1
Windows Explorer in a MDI-Window ?
Posted: Thu Nov 30, 2006 2:16 pm
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
Posted: Fri Dec 01, 2006 5:27 pm
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
Posted: Fri Dec 01, 2006 6:28 pm
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