Re: Problem of gears with VB.NET System.Windows.Forms.WebBrowser control

11 views
Skip to first unread message

Nicolas Roard

unread,
Sep 4, 2008, 10:45:13 AM9/4/08
to Ramesh Marand, gears.team....@gmail.com, gear...@googlegroups.com
Hi,

On Thu, Sep 4, 2008 at 3:36 PM, Ramesh Marand <p...@tatvasoft.com> wrote:

Hi Friend,

 

What I want, First of all let me explain what the problem I have.

My problem is we have a web application; we used Google gear for caching images, is and css files.

It is works well in IE, firebox, Google Chrome browsers, we gain good improvement in performance using Google gears.

But we have another VB.NET desktop application, we have used System.Windows.Forms.WebBrowser control in this vb.net application. This application is like our custom browser and some our application related features.

 

Now the problem is when we browse our web application from our VB.NET window application browser then it fires request for all files even those are cached.

 

We want to integrate Google gears into System. Windows.Forms.WebBrowser so it will work as IE works.

You'd need to have gears loaded by the control; but this is likely not a trivial problem, if possible at all.

 

Please help me to complete my R&D task.

 

Thanks and regards,

Ramesh Marand

www.tatvasft.com

We code your concepts…

 


--
Nicolas Roard
Google UK London
image001.jpg
image002.gif

Michael Nordman

unread,
Sep 4, 2008, 3:48:40 PM9/4/08
to Ramesh Marand, gears.team....@gmail.com, gear...@googlegroups.com
Hi Ramesh, I think you can accomplish what you want by explicitly creating an instance of the Gears.BHO (COM Object) and calling it's SetSite(browsercontrol) method after you have created an instance of the IE browser control. And then prior to disposing of the embedded IE control, calling gearsBho.SetSite(NULL).

Scriptable gears objects should be accessible to scripts executing within the embedded instance w/o manually initializing the Gears.BHO.  The manual BHO initialization will cause gears to register it's network intercept hooks (a asynchronous pluggable protocol handler). Generally the network intercept hooks are only registered within an actual IE process. Once that is done in your process, http resources contained in the gears localserver should be returned when requested by the embedded browser control (and by other parts of your app that use URLMON too).

Hope this helps.
Reply all
Reply to author
Forward
0 new messages