Results 1 to 6 of 6

Thread: How to stop downloads in a VB built browser

  1. #1

    Thread Starter
    Member scruffybear's Avatar
    Join Date
    Oct 2004
    Location
    Cornwall
    Posts
    39

    Question How to stop downloads in a VB built browser

    I have a browser built in VB6. I need to stop downloads occurring when a user clicks on a link in a web page.
    How do i go about this?

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    You want to stop all downloads? Or just the ones occuring in the browser, like the 'Stop' button in Internet Explorer
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  3. #3

    Thread Starter
    Member scruffybear's Avatar
    Join Date
    Oct 2004
    Location
    Cornwall
    Posts
    39
    Hi,
    I have managed to figure out a crude way of stopping the downloads if a user clicks on a link by using BeforeNavigate2 and looking at a list of extensions.

    I would like to stop all downloads, but not sure if this is possible as an image is also a download. Wondered if using dhtml.dom (ithink thats right) if i could also create a porn blocker, but have never used this, so any help would be appreciated.

    Found the fix above in an article on this site.

    Terry

  4. #4
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Canceling downloads is quite easy. The Web Browser control has a FileDownload event. Use the Cancel parameter to stop the download.
    VB Code:
    1. Cancel = True
    Yes, you can use the DHTML DOM to make a porn blocker. I suggest you read my latest article (Using the Web Browser control, see sig for link). It includes code for a very simple blocker. In the article that is to appear next month I'll include code for a more advanced porn blocker.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  5. #5

    Thread Starter
    Member scruffybear's Avatar
    Join Date
    Oct 2004
    Location
    Cornwall
    Posts
    39
    Hi,
    it was your article that i got the fix from, great article and am looking forward to the next one.

    Terry

  6. #6
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by TheVader
    Canceling downloads is quite easy. The Web Browser control has a FileDownload event. Use the Cancel parameter to stop the download.
    VB Code:
    1. Cancel = True
    Yes, you can use the DHTML DOM to make a porn blocker. I suggest you read my latest article (Using the Web Browser control, see sig for link). It includes code for a very simple blocker. In the article that is to appear next month I'll include code for a more advanced porn blocker.
    Why would ANYONE block pr0n? o.0
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width