Using the concepts from the sample code provided by Microsoft for loading HTML content into an IWebBrowser from an IStream using the web browser's IPersistStreamInit interface:
pseudocode:
void LoadWebBrowserFromStream(IWebBrowser webBrowser, IStream stream)
{
IPersistStreamInit persist = webBrowser.Document as IPersistStreamInit;
...
I have a TWebBrowser placed on a form with the designMode enabled.
Bellow the browser I have a close button with the Caption set to 'Clos&e'.
When I am editing the contents of a document inside the WebBrowser and I press the key E the button close is called.
It appears that it is treating TWebBrowser like other controls that don't handle...
There is another way to load MSHTML documents without use Application.ProcessMessages?
To load a document into a IHTMLDocument I need to do this:
while Doc.readyState <> 'complete' do
Application.ProcessMessages;
I want not to process all the message queue during the loading, because I would be changing my application flow, in ...
I ran into an interesting (?) problem in the YUI rich edit demo on IE. When looking at the window object for the content editable frame used as the browser I see that the eval function is undefined (by running the following).
javascript:alert(document.getElementById("editor_editor").contentWindow.eval)
This only happens on IE (I check...
I'm maintaining a WPF based application which contains a WinForms based WebBrowser control that based on the IE web browser control. When we deploy, we have had to also supply Microsoft.mshtml.dll and do some custom configuration stuff for our ClickOnce publishing process as well in order to get things to work.
I'm curious that with the...
Hi
I am trying to execute the Filter sample which comes with Windows Search 3.x sdk.
I am getting below MIDL2035 errors, saying Constant expression expected.
Thanks for the help.
Mitech.
...
In a C# WPF program I'am trying to set the value of a HTML Text element which is defined:
<input name="tbBName" type="text" id="tbBName" tabindex="1" />
I tried the following:
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)webBrowser1.Document;
mshtml.HTMLInputTextElement tbName = (mshtml.HTMLInputTextElement)doc.getElementsByName("t...
I have a WebBrowser control. I have added some JavaScript into the head tag and I can see it is working as expected by adding an alert. Inside of this js I am creating a function and adding some members to it's prototype like so:
function test() {
}
test.prototype.run = function() {
alert('success!')
}
function createTest() {
...
Does anyone know a way of rotating an image (jpg or gif) in a TWebBrowser control (using Delphi)
Update
The file would be local.
Update 2
So I guess the question should be how do I rotate an image or pdf.
...
I've written a BHO based on this tutorial:
http://www.codeproject.com/KB/cs/Attach_BHO_with_C_.aspx
My GetSite and SetSite are identical to the tutorials listing. I am adding/removing an OnDocumentComplete handler and assigning SHDocVW.WebBrowser webBrowser inside the IObjectWithSite SetSite function
for debugging purposes I've removed...
I have a 32bit application running on Windows 7 64bit. The application (written in C++) hosts a WebBrowser control.
When the WebBrowser control is asked to popup a new windows (through a javascript window.open() call), it launches a new Internet Explorer process. In particular, this new IE process is a 64bit IE process.
Since web pag...
I am currently working on a project that needs to be able to set the value of an input element of type "file" in an HTML document using mshtml.HTMLInputFileElement. I am having a great deal of difficulty doing this.
First I tried this:
IHTMLInputFileElement element = (IHTMLInputFileElement)args[0];
string filename
element.value = new...
Is there any way to get the font size of the currently selected text in the Microsoft WebBrowser control (MSHTML)?
I am aware of IHTMLDocument2::queryCommandState("FontSize", ...), but this method only returns a value between 1 and 7, for the outdated font sizes "xx-small" to "xx-large". For font sizes like "10pt" or "14px", no useful v...
Hi,
I am trying to manipulate a requested document in the WPF WebBrowser-control. I already managed it to invoke JavaScript on loaded document, but I am not able to change the shown HTML-code in the control itself.
My (very simplified) code in the OnNavigating-Handler looks like this:
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)...
Hi, I'm a little confuse and maybe you can help me.
I've the mshtml.dll (version 8.0) and the Microsoft.mshtml.dll (version 7.0)
If I go to add a reference to my WPF project and try to add the mshtml.dll, it tells me that the reference has to be a valid assembly or com component. And that's right as I know I have to add a reference to ...
Hey all,
I am working a project in C# that allows the user to edit a webpage. It is using mshtml for the editor.
I'm looking for a way to protect a couple of table cells.
Basically they can edit everything except what is in the specified table cell. The user does not have access to the source code of the webBrowser.
Thanks for any ins...
Hello all,
I have integrated a web page inside my native C++ Application through MSHTML (Microsoft Rendering engine of IE).
What I want to do now is to generate a LPDIRECT3DTEXTURE9 (Direct3d texture) of the displayed web page.
Is it possible ?
Do you know how to ?
Thanks in advance for all your answers.
...
Hi, I'm a little confuse and maybe you can help me.
I've the mshtml.dll (version 8.0) and the Microsoft.mshtml.dll (version 7.0)
If I go to add a reference to my WPF project and try to add the mshtml.dll, it tells me that the reference has to be a valid assembly or com component. And that's right as I know I have to add a reference to ...
I'm autmating the UI of our web application using Watin. One of the page (X) has got an anchor tag which navigates to another page (Y). Page X pops up an confirm dialog on "OnBeforeUnload" event. So when someone manually clicks on the anchor tag, the confirm dialog pops up and when user clicks on the ok button the navigation continues. I...
Hi,
I'm using .NET 4, trying to add a reference to mshtml, and I want to have all the capabilities depending on the version the client has installed.
If I add a reference to the COM component called 'Microsoft HTML Object Library', the reference is labelled "MSHTML" and the path points to an assembly in the GAC called 'Microsoft.html' ...