Questions tagged [ihtmldocument]

26 questions
15
votes
3 answers

How to render HTML element without using web browser?

Is there a way how to draw specific HTML element content on a canvas without using any web browser control ? With this code I'm rendering the element to the form's canvas (just as an example). It works though, but this code is not a good practice -…
TLama
  • 75,147
  • 17
  • 214
  • 392
6
votes
2 answers

How do I create an IHTMLDocument2 using a string from TIdHTTP?

I download a URL with IdHTTP.Get, and I need to search the HTML tags and extract some data. How I can convert the string that IdHTTP.Get returns into an IHTMLDocument2?
SadeghAlavizadeh
  • 609
  • 3
  • 17
  • 33
5
votes
3 answers

MSHTML tutorial

I want to learn some basics about MSHTML, like how to use IHtmlDocument and IHtmlDocument2 interfaces. I searched for quite a while, but can not find out a tutorial for beginners. Could anyone recommend something to read? EDIT: I prefer to use C#.
George2
  • 44,761
  • 110
  • 317
  • 455
3
votes
1 answer

Using IHTMLDocuments 1, 2, 3 & 4

I am using a web browser in my current project and currently I'm using it in design mode to make it editable etc. The code I am currently using is: WebBrowser.Document.DomDocument as IHTMLDocument2 What actually is an IHTMLDocument2, 3 or 4? I…
xoxo
  • 567
  • 7
  • 25
3
votes
1 answer

How to get mshtml.IHTMLDocument6 or mshtml.IHTMLDocument7?

I am using IE11 in Windows 7. Then I added a reference in C# project c:\Windows\System32\mshtml.tld and try to get mshtml.IHTMLDocument6 or mshtml.IHTMLDocument7, but VS2013 doesn't see it. I can only get mshtml.IHTMLDocument, mshtml.IHTMLDocument2…
askeet
  • 689
  • 1
  • 11
  • 24
2
votes
1 answer

Change div innerHTML through IHTMLDocument2 and C++

I'm trying to change the content of a div using IHTMLDocument2 interface this way: IHTMLElementCollection* collection = NULL; IDispatch* mydiv; doc2->get_all(&collection); long count; collection->get_length(&count); //just…
Entretoize
  • 2,124
  • 3
  • 23
  • 44
2
votes
1 answer

How to load html contents from stream and then how to create style sheet to display the html file in preview pane (like HTML preview handler)

I am developing a Visual c++ application and I have to develp preview handler for HTML preview in preview pane. I have idea of doing the same for Xml documents(for xml files they create style sheet to accomplish this task) but I don't know how to do…
Sss
  • 1,519
  • 8
  • 37
  • 67
1
vote
1 answer

Using IHTMLDocument instead of IWebBrowser2

I want to display a simple web page in my Win32 application. I have read this question IWebBrowser2: how to force links to open in new window? I want to do exactly stated in the reply of the question, but havn't found a code example. Is there a…
Madhur Ahuja
  • 22,211
  • 14
  • 71
  • 124
1
vote
1 answer

Get a particular input element from a particular form

Like the statement, string value = document.forms["sap.client.SsrClient.form"].elements["sapwdssr..requestCounter"].value; in javascript, is there a corresponding statement to get the value of a particular input element within a particular form in…
arunondeck
  • 368
  • 6
  • 16
1
vote
0 answers

C# Difficulty accessing HTML DOM element

I am trying to access an element from a website, however, it is not returning the complete element.
Ruben R.
  • 11
  • 3
1
vote
0 answers

How to get selectedItem from a dropdown or listbox using IHTMLEventObj in C# Code

I want to log the selectedItem from a dropdown opened in a IE browser. Following is my code to get browser event on my c# program, Its working but I couldn't get the selected text of a listitem from the browser. private void…
vijesh
  • 1,115
  • 1
  • 11
  • 27
1
vote
1 answer

When using Microsoft Html Control the ReadyState never gets further than Interactive

We are using the Microsoft MSHtml control to render and modify web pages, we have today deployed to Citrix and found that the document state often does not get any further than interactive while we are expecting it to get to completed. We are using…
Kev Hunter
  • 2,565
  • 4
  • 25
  • 39
0
votes
1 answer

Force bold with IHTMLDocument

I am using an HTML editing control build on MS HTML. I need to be able to force text to be bold/unbold and cannot find an easy way to do this. I can toggle bold status as follows: (D as IHTMLDocument2).execCommand('Bold', False, EmptyParam); I can…
Zax
  • 471
  • 1
  • 4
  • 14
0
votes
1 answer

Include post variables in a createDocumentFromUrl call in .NET

I have a project in Visual Basic 2010 Express that parses web pages use the IHTMLDocument object. Here is the function I am using to retrieve a web page: Private Function GetHTML(ByVal url As String) Dim htmldoc As New HTMLDocument() Dim…
zeke
  • 3,603
  • 2
  • 26
  • 41
0
votes
1 answer

Assigning IHTMLDocument2 instance to a TWebBrowser instance

I am using an instance of the IHTMLDocument2 interface to parse some HTML as described in this post: Load from IPersistMoniker takes long time to load unresolvable URL The code is relatively simple: DelphiInterface diDoc2; HRESULT hr…
Coder12345
  • 3,431
  • 3
  • 33
  • 73
1
2