90 questions
2
votes
0
answers
136
views
Delphi 11.3: save MHT with resources without dialog
My code:
uses
System.SysUtils, MSHTML, ActiveX, SHDocVw;
implementation
procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Navigate('google.com');
end;
procedure TForm1....
0
votes
1
answer
53
views
Trouble Accessing Host Alias in Smarty Template (Centreon)
The issue in my script arises from incorrect usage of the Smarty variable to access the host alias (host_alias). While I correctly utilized the $service.host_name variable to display the host name, ...
0
votes
1
answer
376
views
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:
...
2
votes
1
answer
167
views
Memory leak using IHTMLEventObj handlers with TWebBrowser
I'm using a TWebBrowser to display a WYSIWYG HTML editor and I've added some handlers to catch keyboard and mouse events so I can integrate this editor into my application flow. This browser is ...
0
votes
1
answer
334
views
VBA IE to click on inside a table
I need to click ('href' ) on the called 'WS557568037 / Personal Workspace' butnothing has worked. I have tried this code:
'Dim htmlElement As MSHTML.IHTMLElement For Each htmlElement In HTML....
1
vote
0
answers
482
views
IHTMLDocument2_write Causes Internet Explorer Security Pop Up - Powershell
I have a Powershell script that opens an html file saved locally and parses the file. When it is run from the server where it was created it works fine. However, when I run it from the server where it ...
1
vote
0
answers
305
views
C# Difficulty accessing HTML DOM element
I am trying to access an element from a website, however, it is not returning the complete element.
<div id="playcontainer" class="play bigger isnd">
<div id="dooplay_player_response"&...
1
vote
1
answer
1k
views
How can i detect if an Iframe has loaded in C#
I want identify in an HTML document whether an Iframe has loaded or not.
Here is what I tried, but I am pretty not sure if this is the right way to identify the loading of IFrame:
var myhtmlDocument =...
0
votes
1
answer
473
views
I have a problem getting hyperlinks from IHTMLDocument2 in Delphi
I have a problem getting hyperlinks from IHTMLDocument2 in Delphi.
For instance, instead of returning the full link "http://ena.ge/explanatory-online", IHTMLDocument2 returns "about:/explanatory-...
0
votes
1
answer
265
views
System.NotSupportedException when accessing a variable of IHtmlDocument2.Script in 32 bit outlook after a second navigate
I'm working on an addin in outlook using VB .Net that views an html window in the reading pane using mshtml interface. The page has some javascript code which I call using IHtmlWindow2.execScript. I ...
2
votes
1
answer
205
views
How to find out ContentType of HtmlAgilityPack.HtmlDocument
Im trying to determine the content type of HtmlAgility.HtmlDocument. Any idea??
HtmlWeb web = new HtmlWeb();
var hDocument = web.Load(/*string*/ url);
I want to know how ...
1
vote
0
answers
636
views
Uploading a file to a Webpage(IE11) with Excel Macro Vba
I'm trying to use the following code to upload a file to a webpage:
WD.document.getElementById("fileUpload").Value = "filepath"
'The code does not came with the property 'value' empty( = "") its just ...
1
vote
0
answers
162
views
Parse Chrome window similar to IHTMLDocument2
Using the code posted below Ican get the window handle of a Internet Explorer window and transform it into a IHTMLDocument2 object to read the html. Is there anything similar that can be used for ...
0
votes
0
answers
614
views
Links in IHTMLDocument2
I use IHTMLDocument2 to retrieve strings with innertext in TD Tag and I have links to recover but I do not find how using an innerhtml I see my link but I do not know how to retrieve it.
My HTML
&...
3
votes
0
answers
127
views
How to handle access violation?
Certain functions in my program get a bad pointer with a low probability.
The pointer is the CComPtr <IHTMLDocument2> m_htmldocument2 variable.
Moving the m_htmldocument2 variable to a local ...
7
votes
4
answers
13k
views
Unable to use IHTMLDocument2
$wc = New-Object System.Net.WebClient
$DownloadString = $wc.DownloadString("http://www.example.com")
$HTML = New-Object -ComObject "HTMLFile"
$HTML.IHTMLDocument2_write($DownloadString)
Server script ...
2
votes
1
answer
495
views
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);
...
1
vote
1
answer
549
views
Disabling VML support in HTMLDocument parser
I am parsing and massaging existing HTML files created by Word (the files cannot be recreated). The HTML files with embedded images include conditional formatting for the vml enabled browsers similar ...
0
votes
1
answer
453
views
getElementsByTagName with IHTMLDocument3 randomly returns nothing
I'm trying to fill some form input fields in internet explorer from a c++ program but I'm facing a random bug that I hope is because of my code:
UINT msg = RegisterWindowMessage("WM_HTML_GETOBJECT");
...
2
votes
2
answers
3k
views
How to load HTML string to embedded WebBrowser control?
I know there are a lot of articles about this on the internet, and I tried many of them. Although I can make my browser load a webpage on internet, somehow I can't manage to make it load HTML from ...
0
votes
1
answer
793
views
How to set the "base URL" for a HTML document loaded from memory using IWebBrowser2?
I'm using IHTMLDocument2::write() as described here in order to load HTML from memory into an IWebBrowser2 instance. The code is shown below:
#include <MsHTML.h>
void CMyDlg::WriteHTML(const ...
-1
votes
1
answer
10k
views
EOleSysError exception is raised in Windows10
In my application parse HTML document by using IHTMLDocument2, EOleSysError exception is raised during creating instance of IHTMLDocument2.
In few days ago, My application worked correctly.
Are there ...
0
votes
0
answers
178
views
C++) ihtmldocument2::put_charset Does not work with Meta tag
I want to change mht file's charset. So I used ihtmldocument2::put_charset
If file has no Meta tag charset, It does work. If file has Meta tag, put_charset does not work.
Here is my code.
...
0
votes
1
answer
681
views
Font size changes in print wpf
I have a very basic WPF form which i want to print
<Grid x:Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
...
3
votes
1
answer
1k
views
Access denied on switching to other frame (.Net WebBrowser, MsHTML) cross-domain Exception
i'm trying to switch for another frame (With no name or id) but getting Exception.
object index = 0;
var frame = (mshtml.IHTMLWindow2)workDocument.frames.item(ref index);
frameDocument = (mshtml....
0
votes
1
answer
714
views
IE Extention/Plugin/Addon javascript injection in iframe and document c#
I am facing issue with BHO in C# ,Javascript not inject in iframe .
How to get access of <iframe> body using c++/ATL/COM?
question is similar like but in this above using com. i want to use C#....
2
votes
1
answer
973
views
How to set value of a textfield using C# / IHTMLDocument2
I am a hobbyist programmer and want to do the following:
Log into a site via Username - / Password
Click an image which directs me to a certain (sub)site
Fill out a form
BEFORE submitting the form, I ...
3
votes
0
answers
145
views
Why can't I modify an anchor's name in IHTMLDocument2?
I writing on a script that reads from a local HTML file, modifies DOM tree and then save. Instead of Invoke-WebRequest, using HTMLFile COM object seems the only way to do so.
Rewriting to other ...
0
votes
1
answer
1k
views
Get html forms and fields of string in Delphi
I have a system that gets a html via GET every 1 second to update the system data in this html can have 1-20 forms, need to take all forms and assemble a querystring fields of each form, I have a ...
0
votes
2
answers
748
views
EOleException in IHTMLDocument2.write only in the windows 10
the following procedure works with Windows XP, 7-32, 7-64, 8-32, 8-64, with version of IE 8 to 11 more not work fot the new Windows 10, see the code:
try
IDoc := CreateComObject(Class_HTMLDOcument) ...
0
votes
1
answer
464
views
How to retrieve the WebBrowser control from the HTMLDocument it contains, in WPF?
My WPF application is creating multiple WebBrowser controls. I know how to manipulate the HtmlDocument within each and also how to handle mouse events on them.
However, from within a mouse event which ...
1
vote
0
answers
483
views
How to invoke onchange, onblur events of a DOM element inside WPF WebBrowser
I've tried a lot to find a solution of invoking DOM events of the loaded document of WPF WebBrowser. Here's a code to invoke click event-
mshtml.IHTMLDocument2 htmlDoc = webBrowser.Document as mshtml....
0
votes
0
answers
476
views
Setting IHTMLDocument2 to nil (or FreeAndNil) causes Access violation
I have a system that is using IHTMLDocument2 to work an html received a idhttp, so far so good, the problem that depending on the version of windows + version of Internet Explorer + some other detail ...
0
votes
1
answer
646
views
Reduce memory consumption by delphi application
I have in my one thread system that receives an html a TIdHttp and treats this html with IHTMLDocument2 as below:
if IDocTabela = nil then
IDocTabela := CreateComObject(Class_HTMLDOcument) as ...
1
vote
2
answers
986
views
Handle html without the use of TWebBrowser
Hello everybody I am reformulating the question, I'm getting a html with a tidhttp and working this html in a TWebBrowser this way:
(WebBrowser.Document as IHTMLDocument2).body.innerHTML := xHtml;
...
0
votes
0
answers
116
views
ASP Page becoming truncated when converting to IHTMLDocument2 using .innerHTML
I'm reading in an .ASP page from a server. The problem I am having is that the page is becoming truncated when I attempted to read the data in by means of the C# code below.
Below is my code ...
4
votes
1
answer
454
views
COM Interface versioning and inheritance
Why doesn't IHTMLDocument3, for example, inherit IHTMLDocument2?
Why doesn't IAnyMicrosoftInterface(N) inherit IAnyMicrosoftInterface(N-1)?
New interfaces just contain only new functions, but they ...
0
votes
0
answers
193
views
IHTMLDocument3 of all tabs
My aim is to get a IHTMLDocument3 interface of each tab opened in the same internet explorer window, in order to fill out some forms.
What I've done until now: I assign a IWebBrowser2 interface to ...
1
vote
1
answer
708
views
Free memory for IHTMLDocument2
I'm using IHTMLDocument2 as this:
var
doc: OleVariant;
doc:= coHTMLDocument.Create as IHTMLDocument2;
doc:= CreateComObject(Class_HTMLDOcument) as IHTMLDocument2;
doc.write(html);
doc.close;
(...)
...
1
vote
2
answers
4k
views
HTMLDocumentClass and getElementsByClassName not working
Last year I had powershell (v3) script that parsed HTML of one festival page (and generate XML for my Windows Phone app).
I also was asking a question about it here and it worked like a charm.
But ...
0
votes
0
answers
503
views
How to get IWebBrowser2 of Internet Explorer running in "metro" mode?
I've got some C++ code, that uses ShellWindows to retrieve instances of IWebBrowser, but there is a problem, when IE is run in metro-mode - there are no instances in ShellWindows.
Are there any ...
3
votes
1
answer
467
views
IHTMLStyleSheetRulesCollection for style tags (inline styles)
I use IHTMLDocument2 interface to retrieve IHTMLStyleSheetRulesCollection using the IHTMLDocument2::styleSheets property. It works fine for retrieving styles within <style> tag (in document <...
1
vote
1
answer
648
views
Translating Delphi VarSupports to C++ Builder
I am attempting to translate this code from Delphi to C++ Builder:
procedure HandleStyleSheets(const Document: IDispatch);
var
Doc: IHTMLDocument2; // document object
...
2
votes
1
answer
1k
views
Webbrowser Control - displaying text using "write"
I'm using the IWebBrowser2 interface to render a page from an HTML string created at runtime. I have written a method (let's call it DisplayHtmlString) that takes an HTML string and renders it as ...
0
votes
0
answers
473
views
How to host activex control for to render html on window using Visual c++ (x64) application
I am trying to render a html file in my own create window using Visual c++(x64). I have done every thing I just need some mechanism to display html file in my own window.I have html file contents ...
0
votes
1
answer
297
views
how to host html control in my window using a buffer which contents a html file
I am developing a visual c++ applicatio(x64). what actually i am trying to do is that suppose we have a html file in window explorer(i mean file with file extension ".html"). when we single click on ...
1
vote
1
answer
944
views
Make CHtmlView enables activex control download
I'm a newbie to CHtmlView of Visual C++ programming. I need to make a web-browser application display website by IHTMLDocument2 interface which will need to download activex control from website and ...
2
votes
1
answer
3k
views
How can I get IHtmlDocument2 in chrome browser?
In Internet Explorer, I can use IHtmlDocument2 to get the html document.
function GetCurrentBrowserDOM: WideString;
var
hr: HRESULT;
CurrentIE: IWebbrowser2;
Wnd: HWND;
WndChild:HWND;
...
5
votes
1
answer
6k
views
how to get an IHTMLElementCollection obj which composed of several IHTMLElements?
guys: I got a problem about "how to get an IHTMLElementCollection obj which composed of several IHTMLElements" in object-pascal programming , my codes below:
function TExDomUtils....
1
vote
1
answer
942
views
Refresh Internet Explorer_Server from handler
Is it possible to force Internet Explorer_Server to refresh it content?
What I have is a handler to that object in external application (like in my similar question)
I found a nice tutorial on ...