views:

38

answers:

2

I have a C# winform with a webbrowser control on it. I'd like to know if it is possible to add the Google Toolbar to this winform and have it interact with the webbrowser control, specifically for the "Translate" functionality. Is this possible?

A: 

Yes the contract between deskband and their host are defined in IE SDK. You just need to implement the same set of contracts like IE does.

However Google Toolbar is known to relay on many undocumented behavior of IE (e.g. somehow it changed the new tab page to speed dial while there is no API exists for that) so you need to simulate IE as much as you can, from Window hierarchy to COM interfaces exposed by objects to default new tab and error pages. I suggest you to contact Google for what you need to do to remain compatible to Google ToolBar, as Google's code revolves rapidly.

Sheng Jiang 蒋晟
+2  A: 

If you want to do translation in your Windows Forms app, then perhaps you should try using a translation API.

Try this - http://googlified.com/unofficial-google-translate-api/

Saajid Ismail
Good suggestion, but could you or someone else suggest a different translation api? The uOGT api looks like it was designed to run in a web app, on a PHP server. I need a web service I can call from a windows app to do the translation of the entire web page. I am also confused about exactly how I would plug this into my app? By hooking the DocumentCompleted event, calling the translation service, then updating the DocumentText? Would that work?
Rodney Burton
Or use the Bing Translator which has a web service interface
Sheng Jiang 蒋晟