views:

415

answers:

1

I have a VB6 Application which creates an instance of the internet explorer and implements drag and drop for this instance. I am using the event BeforeNavigate2 so that when user drops a file or a folder on the explorer, the event will return the path.

......
Public WithEvents myIExplorer as new SHDocvW.InternetExplorer
......
Private Sub myIExplorer_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, 
                Flags As Variant, TargetFrameName As Variant,
                PostData As Variant, Headers As Variant, Cancel As Boolean)

    If IsFile(URL) Then
       'Process file
    Else
       'Process folder
    End if

End Sub

It works great with Internet Explorer 6. However, it does not work properly with Windows Internet Explorer 7. When I drop a file it works but when I drop a folder it just opens the folder and it does not fire the event.

What has changed in IE7? Is there any setting? Is there any security issue?

Thanks

A: 

IE6 had what was known as "Shell Integration", which basically means that iexplore.exe and explorer.exe did the same thing, which was open a common frame that could host either a webpage or a shell folder.

For IE7, this integration was removed for a number of technical reasons, among them being the Protected Mode IE security feature and the desire to easily ship IE7 downlevel to Windows XP as well as Windows Vista.

So, to answer your question, yes, something changed in IE7. If you try to navigate to a local file path, pretty much via any mechanism, it aborts the navigation and delegates it to the running instance of the explorer.exe shell. There is no setting to revert to the previous behavior.

If you need this to work, you should consider writing a Shell extension and not a Browser extension.

jeffamaphone
Hello jeffamaphoneThank you for your answerI will have a look at shell extensions
Ioannis