Geeks With Blogs

The Lanham Factor The (ir)rational thoughts of a (not-so)mad man

The saga continues...Regarding Web browser control in WinForms, GDI+ with the Web browser, and general sleep deprivation...

So we choose an interim solution until we get to the "final" solution (on which I will post later).  The interim solution involves using the Web browser control and doing NO DRAWING.  Straight-forward, yes?

No.

Two problems...AND a piece of technical advice.

  1. Bitmaps and Content Types - The Web browser control does NOT like to render bitmaps (.bmp).  Now keep in mind, I know this.  So I tell the client and he appropriately modifies the Web services to set the content type to "image/gif" or "image/jpeg".  However, the file is saved locally as a .bmp.  The file size is inflated (as one would expect).  If I change the file extension, Web browser control no likey.  HOWEVER, if I delete the file extension, it renders.  WHAT THE HECK IS THAT ALL ABOUT?!?!
  2. Browser Events Fired into WinForms - As it turns out, any method on the Form that is referenced by script in the browser must be Public.  While this may seem obvious, as you well know (and work with me here), chronic sleep deprivation can make you overlook the most obvious things.  MANY MANY thanks to the CodeBird for solving this one!

So it seems that no matter how many carpet bubbles we push to the floor...at least one (and often two or three) more bubbles appear in other parts of the carpet.

Posted on Friday, February 2, 2007 8:05 AM Cutting Code | Back to top


Comments on this post: Carpet Bubbles - The .NET Web Browser Control

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Brian Lanham | Powered by: GeeksWithBlogs.net