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

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

FileDownload event not fire


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

  • 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.

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.
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".

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