Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a program that when F1 is pressed shows the form that has a webbrowser control in it and Google Translate website page is open, the user writes text and it used to work awesomely before, now there seems to be a change in Windows or Google Translate webpage that I see the text "Translating..." in the translation textbox and it doesn't translate or sometimes takes a very long time, compared to almost instant translation in Chrome! also in my program if I open another website like Google Images and search for "cat" it takes a long time

What I have tried:

Maybe it's about default web browser so I changed from Chrome to Firefox, the translation seems to work for now but I guess it will malfunction again.


I tried these, the submit one (every 100 ms on "source" textbox) made my source textbox delete added text so I commented (disabled) it.
C#
webBrowserGoogleTranslate.Document.GetElementById("source").Focus();
                    //webBrowserGoogleTranslate.Document.GetElementById("source").InvokeMember("submit");
Posted
Updated 11-Feb-20 5:18am
v2
Comments
Patrice T 9-Feb-20 11:12am    
Why not asking Google ?
john1990_1 9-Feb-20 11:33am    
It is supposed to be something like submitting the text in the textbox for the page to know it should translate it, I do a lot of "focus" and "select" commands on it maybe they're the reason, you mean in Google community, I will try?
john1990_1 9-Feb-20 16:19pm    
I asked in Google community, there are no answers yet!
john1990_1 9-Feb-20 16:20pm    
In fact it translates, it just takes sometimes 7-10 secs and sometimes instantly.
[no name] 9-Feb-20 11:23am    
Maybe because google is not willing to translate for free?

1 solution

By default, unless you've changed the registry, the WebBrowser control is stuck in "IE7" mode.

Web Browser Control & Specifying the IE Version - Rick Strahl's Web Log[^]

IE7 is almost 14 years old. Almost no sites will support it. The cost of maintaining compatibility is too high compared to the vanishingly small number of users.

If you can't apply the registry tweak to force the WebBrowser control to use IE11 mode, then you should switch to using a more modern control. For example, CefSharp[^] or WebView[^] .
 
Share this answer
 
Comments
john1990_1 12-Feb-20 11:02am    
This was an issue before and I asked and they told me how to make the program use the newest version of IE, now the website (page) opens, but it takes 7-15 seconds for text in source textbox when changed to be translated (for the translation to appear in the translation textbox)... I think the "submit" command on the source textbox have solved it but I haven't given it enough testing so I'm not sure..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900