Thursday, August 19, 2004 7:31 PM szurgot

(De-)Evolution of a software program (part 2) - Failed Attempts

For those who are interested, start with Part 1

(I suspect that this part might have been easier had I worked with VB or COM, but I skipped from C to Perl, then to Java, then to .NET.)

Using the Internet Explorer control is relatively easy if all you want to do is display pages. Just add it to the toolbox, setup the Navigate function, and away you go. It's even pretty easy to use a lot of the events. Progress events, status changes, and the like are pretty easy to capture, even download starts. The problem comes in when you try to use some of the more advanced concepts. Capturing download ends is right out. You can get a NewWindow event that tells you the URL, and a NewWindow event that lets you cancel the event or even capture it in your even, but not one that lets you do both at the same time. Ugh. There are ways to turn off Java Script events, but even following the walkthroughs, I could never get them to work.

This is all compounded by the fact that there are several different versions  There's the offical version that comes with VS.NET, there's a small version compiled by someone out there, I've found one compiled by the RSSBandit team that's pretty concise at this point, there's even a nice one in Whidbey (that still doesn't handle the New Window issue)

I can't say I've ever spent a whole lot of time on it, but over the years, I've pulled my hair out over this issue trying to get it right.

However, thanks to XP SP2, I had an Ah-ha moment the other day, about how to gracefully handle at least part of the program, and side-step all of the issues completely...

(Coming up... Build vs Borrow?)

 

Filed under:

Comments

# re: (De-)Evolution of a software program (part 2) - Failed Attempts

Friday, August 20, 2004 1:38 AM by Jeff Atwood

You're right, we need a managed HTML renderer. I've been waiting for that for a long time.. I have a more-than-sneaking suspicion that writing a decent HTML renderer will be, uh, hard.

# re: (De-)Evolution of a software program (part 2) - Failed Attempts

Friday, August 20, 2004 3:34 PM by Chris Szurgot

I don't have an issue with using the Interop around the Web Browser, I just think the interface needs to be cleaned up a bit.

# (De-)Evolution of a software program (part 3) - Build vs Borrow?

Saturday, August 21, 2004 2:19 AM by TrackBack