mshtml

MSHTML DLL on Windows 10

拜拜、爱过 提交于 2019-11-27 20:41:38
问题 I have a C# solution that makes use of Smith Html Editor (I'm developing on the main project which uses this, so I don't know much about this library), which makes a reference to MSHTML. This worked fine until my upgrade to Windows 10 and it can't find MSHTML anymore. I can directly reference the DLL on the GAC folder, and it stops complaining and thus builds, but it's getting some runtime errors related to the editor not instantiating. After a little research, it turns out that MSHTML is

MSHTML: CreateDocumentFromString instead of CreateDocumentFromUrl

巧了我就是萌 提交于 2019-11-27 16:14:36
I'd like to use the MSHTML library to parse some HTML that I have in a string variable. However, I can't figure out how to do this. I can easily parse the contents of a webpage given a known URL, but not the source HTML directly. Is this possible? If so, how? Public Sub ParseHTML(sHTML As String) Dim oHTML As New HTMLDocument, oDoc As HTMLDocument 'This works:' Set oDoc = oHTML.createDocumentFromUrl("http://www.google.com", "") 'I would like to do the following but no such method actually exists:' Set oDoc = oHTML.createDocumentFromString(sHTML) .... 'Parse the HTML using the oDoc variable' ..

Could not load file or assembly 'Microsoft.mshtml … Strong name validation failed

依然范特西╮ 提交于 2019-11-27 13:46:04
问题 I made a WPF/C# program and I am using the internet control for WYSIWYG HTML editing. it is a regular Executable program. it works on most computers however some computers are giving me the following error. Could not load file or assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. The 'Microsoft.mshtml.dll' file is distributed with the program. It is with all of the other required dlls in

.net document write with mshtml

限于喜欢 提交于 2019-11-27 06:18:52
问题 I am using mshtml for html parsing. (version 7.0.3300.0, C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll). HTMLDocumentClass have a write method so i used it but it raises ComException with ErrorCode:-2147352571 and Message:Type mismatch. What is the reason for it? If write method of HTMLDocumentClass will not be used why did they define? HTMLDocumentClass getHTMLDocument(string html) { HTMLDocumentClass doc = new HTMLDocumentClass(); doc.write(new object[] {

HTML - How do I know when all frames are loaded?

ⅰ亾dé卋堺 提交于 2019-11-27 05:52:16
问题 I'm using .NET WebBrowser control. How do I know when a web page is fully loaded? I want to know when the browser is not fetching any more data. (The moment when IE writes 'Done' in its status bar...). Notes: The DocumentComplete/NavigateComplete events might occur multiple times for a web site containing multiple frames. The browser ready state doesn't solve the problem either. I have tried checking the number of frames in the frame collection and then count the number of times I get

getElementById on element within an iframe

◇◆丶佛笑我妖孽 提交于 2019-11-27 04:28:52
问题 My current code works on elements outside of an iframe. How should I approach fetching elements within an iframe using getElementById? My end goal is to write text within the the <body id="tinymce"><p>...</p></body> tags. I am not using a webBrowser control - this is for an external instance of iexplore HTML Sample Code Sample foreach (InternetExplorer ie in new ShellWindowsClass()) { if (ie.LocationURL.ToString().IndexOf("intranet_site_url") != -1) { IWebBrowserApp wb = (IWebBrowserApp)ie;

Blocking dialogs in .NET WebBrowser control

给你一囗甜甜゛ 提交于 2019-11-26 20:17:37
I have a .NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control's ScriptErrorsSuppressed property to true, which the documentation included with VS 2005 states will [...]"hide all its dialog boxes that originate from the underlying ActiveX control, not just script errors." The MSDN article doesn't mention this, however. I have managed to cancel the NewWindow event, which prevents popups, so that's taken care of. Anyone have any experience using one of these

MSHTML: CreateDocumentFromString instead of CreateDocumentFromUrl

混江龙づ霸主 提交于 2019-11-26 14:48:03
问题 I'd like to use the MSHTML library to parse some HTML that I have in a string variable. However, I can't figure out how to do this. I can easily parse the contents of a webpage given a known URL, but not the source HTML directly. Is this possible? If so, how? Public Sub ParseHTML(sHTML As String) Dim oHTML As New HTMLDocument, oDoc As HTMLDocument 'This works:' Set oDoc = oHTML.createDocumentFromUrl("http://www.google.com", "") 'I would like to do the following but no such method actually

Blocking dialogs in .NET WebBrowser control

一曲冷凌霜 提交于 2019-11-26 07:33:50
问题 I have a .NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don\'t ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control\'s ScriptErrorsSuppressed property to true, which the documentation included with VS 2005 states will [...]\"hide all its dialog boxes that originate from the underlying ActiveX control, not just script errors.\" The MSDN article doesn\'t mention this, however. I have managed to cancel the