How can I download kongregate chat in my web browser?

I have a simple program and I am trying to load kongregate chat into WebBrowser , but it does not work ...

When I first launch it, he goes to the game, and then he gives me 4 Script Error , and the chat just sits there, saying: "Joining the room ...". I do not think that this is a problem with the browser settings, because it works in Internet Explorer. Is there something that messed up with my WebBrowser ? I let him sit there for a few minutes, and he still isn't working. I set suppressScriptErrors to true and false and it still does not fix it.

FYI: I’m not doing anything wrong with my program, for example, cheating or spamming, or something like that, I just want the webpage to display, and sometimes I like to copy things, so I put a few TextBoxes right of it so I can insert it into the chat if I don’t post a few things ...

+7
c # browser winforms
source share
1 answer

This article has a solution to your problem. Apparently, the Visual Studio WebBrowser control starts in IE7 mode by default. This is why you get javescript errors using the control, but not in your browser. I highly recommend you read the article related to this. Fortunately, there is a fix. The following code was taken from another stackoverflow answer to a question that indirectly affects your problem. This link is here, and here is the code.

  string installkey = @"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; string entryLabel = Path.GetFileName(Application.ExecutablePath); System.OperatingSystem osInfo = System.Environment.OSVersion; string version = osInfo.Version.Major.ToString() + '.' + osInfo.Version.Minor.ToString(); uint editFlag = (uint)((version == "6.2") ? 0x2710 : 0x2328); // 6.2 = Windows 8 and therefore IE10 RegistryKey existingSubKey = Registry.LocalMachine.OpenSubKey(installkey, false); // readonly key if (existingSubKey == null) { existingSubKey = Registry.LocalMachine.CreateSubKey(installkey, RegistryKeyPermissionCheck.Default); // readonly key } if (existingSubKey.GetValue(entryLabel) == null) { existingSubKey = Registry.LocalMachine.OpenSubKey(installkey, true); // writable key existingSubKey.SetValue(entryLabel, unchecked((int)editFlag), RegistryValueKind.DWord); } 

In addition, the article I mentioned above says that you must create an entry for the VS host process for your application, or it will not work in debug mode. Good luck, and I hope this solves your problem!

-one
source share

All Articles