Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

FileDownload event not fire

Hi,

I'll like to trap the filedownload event but it's not fired. I create a VB6 program. I know there is a possibility to use Webbrowser control but I want to do it only by code. I don't want to create a new browser.

Here my VB example:

Option Explicit

Private WithEvents mobjIE As SHDocVw.InternetExplorer

Private Sub Form_Load()

  Set mobjIE = New SHDocVw.InternetExplorer
  mobjIE.AddressBar = True
  mobjIE.Navigate "http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/ie6setup.exe"
  mobjIE.Visible = True

End Sub

Private Sub mobjIE_FileDownload(Cancel As Boolean)
  MsgBox "FileDownload"
End sub

Derf
0
SPB_IT
Asked:
SPB_IT
  • 2
1 Solution
 
Bob LearnedCommented:
If you click on the link in IE, you get a download dialog box, which is what you are probably getting from the WebBrowser control.

Bob
0
 
SPB_ITAuthor Commented:
This is a example. My concern is I would like to trap this event because I want to manage download file from a user.
0
 
SPB_ITAuthor Commented:
Microsoft has confirmed is a bug from the SHDOCVW.DLL with VB.
The only way is to trap the Event with Visual C++ and manage this "feature".
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now