Click here to Skip to main content
15,880,503 members
Home / Discussions / C#
   

C#

 
GeneralRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Christian Graus30-Apr-08 19:53
protectorChristian Graus30-Apr-08 19:53 
GeneralRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Zoltan Balazs30-Apr-08 20:00
Zoltan Balazs30-Apr-08 20:00 
GeneralRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Christian Graus30-Apr-08 20:13
protectorChristian Graus30-Apr-08 20:13 
GeneralRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Zoltan Balazs30-Apr-08 20:30
Zoltan Balazs30-Apr-08 20:30 
GeneralRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Christian Graus30-Apr-08 20:39
protectorChristian Graus30-Apr-08 20:39 
GeneralRe: HOW TO CREATE AN INSTANCE OF INTERNET EXPLORER AND HOW TO USE IT? Pin
Anthony Mushrow1-May-08 1:38
professionalAnthony Mushrow1-May-08 1:38 
QuestionHow to Intercept WebBrowser Control default download with my custom downloader? Pin
Anindya Chatterjee30-Apr-08 18:10
Anindya Chatterjee30-Apr-08 18:10 
AnswerRe: How to Intercept WebBrowser Control default download with my custom downloader? Pin
Anthony Mushrow1-May-08 1:47
professionalAnthony Mushrow1-May-08 1:47 
Right then. WebBrowser has an event for Navigating, which gets called just before the control starts redirects to the new url.
You'll need to use the event, and check the extension of the file being downloaded. If the extension is any kind of webpage (htm, html, asp, etc) then you can just ignore it. If the extension is something else (rar, mp3, doc, etc) then you will need to cancel the event, and start your custome downloading code on the url.

A quick example:

void WebBrowser1Navigating(object sender, WebBrowserNavigatingEventArgs e)
{
    //check for webpages
    if(e.Url.AbsoluteUri.EndsWith(".html"))
    {
        //leave now before we start downloading with custom code
        return;			
    }
			
    //Cancel the event, so the control doesn't start downloading the file itself
    e.Cancel;

    //pass e.Url to wherever it needs to go to start downloading
}


My current favourite word is: Bacon!
-SK Genius


GeneralRe: How to Intercept WebBrowser Control default download with my custom downloader? Pin
Spacix One1-May-08 8:50
Spacix One1-May-08 8:50 
GeneralRe: How to Intercept WebBrowser Control default download with my custom downloader? Pin
Anthony Mushrow1-May-08 11:36
professionalAnthony Mushrow1-May-08 11:36 
GeneralRe: How to Intercept WebBrowser Control default download with my custom downloader? Pin
Spacix One2-May-08 5:01
Spacix One2-May-08 5:01 
GeneralRe: How to Intercept WebBrowser Control default download with my custom downloader? Pin
Anindya Chatterjee1-May-08 10:30
Anindya Chatterjee1-May-08 10:30 
QuestionHow to use sgen.exe in postbuild events Pin
Razvan Dimescu30-Apr-08 10:11
Razvan Dimescu30-Apr-08 10:11 
AnswerRe: How to use sgen.exe in postbuild events Pin
Rob Graham30-Apr-08 11:46
Rob Graham30-Apr-08 11:46 
GeneralRe: How to use sgen.exe in postbuild events Pin
Razvan Dimescu30-Apr-08 20:11
Razvan Dimescu30-Apr-08 20:11 
AnswerRe: How to use sgen.exe in postbuild events Pin
Ed.Poore30-Apr-08 11:54
Ed.Poore30-Apr-08 11:54 
GeneralRe: How to use sgen.exe in postbuild events Pin
Razvan Dimescu30-Apr-08 20:09
Razvan Dimescu30-Apr-08 20:09 
QuestionTab key functionality in editor user control Pin
Nouman Bhatti30-Apr-08 9:53
Nouman Bhatti30-Apr-08 9:53 
AnswerRe: Tab key functionality in editor user control Pin
Big Daddy Farang30-Apr-08 10:48
Big Daddy Farang30-Apr-08 10:48 
GeneralRe: Tab key functionality in editor user control Pin
Nouman Bhatti1-May-08 19:30
Nouman Bhatti1-May-08 19:30 
GeneralRe: Tab key functionality in editor user control Pin
Big Daddy Farang2-May-08 5:29
Big Daddy Farang2-May-08 5:29 
QuestionHow to get stored procedure parameters with SQLDMO ? Pin
hdv21230-Apr-08 7:17
hdv21230-Apr-08 7:17 
AnswerRe: How to get stored procedure parameters with SQLDMO ? Pin
Rob Graham30-Apr-08 11:56
Rob Graham30-Apr-08 11:56 
GeneralRe: How to get stored procedure parameters with SQLDMO ? Pin
hdv21230-Apr-08 20:34
hdv21230-Apr-08 20:34 
GeneralRe: How to get stored procedure parameters with SQLDMO ? Pin
goodideadave1-May-08 6:28
goodideadave1-May-08 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.