RE: Get SelectedText from WebBrowser control



Hi Mark ,

Thanks for your post.

webBrowser1.Document property is of type HtmlDocument managed class. We can
use HtmlDocument.DomDocument property to get the unmanaged interface
pointer for this HtmlDocument. Sample code like this:

private string GetLastModifiedDate()
{
if (webBrowser1.Document != null)
{
MSHTML.IHTMLDocument2 currentDoc =
(MSHTML.IHTMLDocument2)webBrowser1.Document.DomDocument;
return (currentDoc.lastModified);
}
else
{
return ("");
}
}

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

.



Relevant Pages

  • Re: regex in C oder RPG
    ... > I am not thrilled about the way the sample code passes the regex_t data ... but use the %addr of the data strucure during the actual call. ... > contents of the data structure into the pointer. ... I run the sample with the string/pattern ...
    (comp.sys.ibm.as400.misc)
  • Re: Invoking a function through function pointer
    ... > pointer to a function. ... I have a sample code, ... > void func(int x, int y) ...
    (comp.programming)
  • Re: ASP.NET - First, Previous, Next, Last record
    ... > Microsoft MVP ... > How do I move the pointer to the first record, previous record, next ... Some sample code would be appreciated. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: regex in C oder RPG
    ... I am not thrilled about the way the sample code passes the regex_t data ... They define the parameter it is passed in as passing by ... but use the %addr of the data strucure during the actual call. ... contents of the data structure into the pointer. ...
    (comp.sys.ibm.as400.misc)