Click here to Skip to main content
15,902,275 members
Home / Discussions / C#
   

C#

 
GeneralRe: the process and services... Pin
Heath Stewart22-Jul-04 12:39
protectorHeath Stewart22-Jul-04 12:39 
QuestionGetTextExtent? Pin
Matt Gerrans22-Jul-04 10:01
Matt Gerrans22-Jul-04 10:01 
AnswerRe: GetTextExtent? Pin
Gary Thom22-Jul-04 10:06
Gary Thom22-Jul-04 10:06 
GeneralRe: GetTextExtent? Pin
Matt Gerrans22-Jul-04 19:25
Matt Gerrans22-Jul-04 19:25 
GeneralRun external program and wait Pin
Boaz V22-Jul-04 9:06
Boaz V22-Jul-04 9:06 
GeneralRe: Run external program and wait Pin
Heath Stewart22-Jul-04 9:25
protectorHeath Stewart22-Jul-04 9:25 
GeneralAtt: Heath Stewart - Browser Helper Objects Pin
Stuggo22-Jul-04 8:46
Stuggo22-Jul-04 8:46 
GeneralRe: Att: Heath Stewart - Browser Helper Objects Pin
Heath Stewart22-Jul-04 9:08
protectorHeath Stewart22-Jul-04 9:08 
In what language? C#? Not exactly the best choice, but it's possible (albeit much slower due to marshaling). If you want resources, a quick search for "BHO" on MSDN[^] would turn up the article, Browser Helper Objects: The Browser the Way You Want It[^].

If you want to do this in C#, you have to declare the IObjectWithSite interface at the very least. It would help to interop the shdocvw.dll library using tlbimp.exe.

The basic concept is that you get the interface for the IWebBrowser (QueryInterface - or casting in .NET with COM interop), get the DWebBrowserEvents2 event interface (also interop'd if you're doing this in C#), and handle any number of events, like DownloadBegin. There's a number of events you could handle, and this will fire before downloading anything. Anything you see in a browser (web page, image, stylesheet, or other file to download) is actually downloaded to your machine. Several events will alert you when a download begins.

Start with the article, and again I recommend you do not use C#. Even though it JIT compiles to native code, there's still a lot of marshaling required once loaded and JIT compiled. Go native - it's much easier and you won't have to be declaring interfaces, structs, consts, and P/Invoking functions as needed.

 

Microsoft MVP, Visual C#
My Articles

GeneralCOM Ports Pin
eggie522-Jul-04 7:09
eggie522-Jul-04 7:09 
GeneralRe: COM Ports Pin
eggie522-Jul-04 7:42
eggie522-Jul-04 7:42 
GeneralRe: COM Ports Pin
Jae Sammy22-Jul-04 7:51
Jae Sammy22-Jul-04 7:51 
GeneralRe: COM Ports Pin
eggie522-Jul-04 8:01
eggie522-Jul-04 8:01 
GeneralRe: COM Ports Pin
Jae Sammy23-Jul-04 4:17
Jae Sammy23-Jul-04 4:17 
GeneralListView ColumnHeader class Pin
Andy H22-Jul-04 6:12
Andy H22-Jul-04 6:12 
GeneralRe: ListView ColumnHeader class Pin
Heath Stewart22-Jul-04 9:31
protectorHeath Stewart22-Jul-04 9:31 
GeneralPDF ActiveX Control Pin
Mr. Rogers22-Jul-04 6:12
Mr. Rogers22-Jul-04 6:12 
GeneralHelp: SQL Update Pin
j1e1g122-Jul-04 5:28
j1e1g122-Jul-04 5:28 
GeneralRe: Help: SQL Update Pin
j1e1g122-Jul-04 5:35
j1e1g122-Jul-04 5:35 
GeneralRe: Help: SQL Update Pin
Heath Stewart22-Jul-04 6:05
protectorHeath Stewart22-Jul-04 6:05 
QuestionHow to implement Zooming? Pin
blankg22-Jul-04 5:18
blankg22-Jul-04 5:18 
AnswerRe: How to implement Zooming? Pin
Anonymous22-Jul-04 5:33
Anonymous22-Jul-04 5:33 
QuestionCrystal Report Viewer do not show box object rounded? Pin
Anonymous22-Jul-04 3:33
Anonymous22-Jul-04 3:33 
AnswerRe: Crystal Report Viewer do not show box object rounded? Pin
Heath Stewart22-Jul-04 5:10
protectorHeath Stewart22-Jul-04 5:10 
GeneralBrowser Helper Objects Pin
Stuggo22-Jul-04 3:11
Stuggo22-Jul-04 3:11 
GeneralRe: Browser Helper Objects Pin
mav.northwind22-Jul-04 3:47
mav.northwind22-Jul-04 3:47 

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.