views:

180

answers:

2

I have two elements on my Windows Forms application:
Webbrowser-Control
Button

Inside of the webbrowser-control I show a very simple html-form with two input type=text. I press the button and get access to both text fields.

Last year at the Qt developer conference there was a quite good presentation: http://labs.trolltech.com/blogs/2009/04/17/jquery-and-qwebelement/

void highlightAllLinks() {
QString code = "$('a').each( function () { $(this).css('background-color', 'yellow') } )";
view->page()->mainFrame()->evaluateJavaScript(code);
}

But I have to do this with .net and Windows Forms. Anyone knowing a good tutorial?

Best regards,
Tom

A: 

See if this link helps, it's a similar question to yours --> http://stackoverflow.com/questions/352159/using-jquery-in-winforms-desktop-app

EDIT:

I actually found code in another, better link: http://stackoverflow.com/questions/153748/webbrowser-control-from-net-how-to-inject-javascript

ryanulit
A: 

Found something:
http://metadeveloper.blogspot.com/2008/10/mashing-up-jquery-and-windows-forms.html

Quite easy to understand - really nice!

simply-tom
Nice. I found that too but didn't see the link to the actual source code. Reading is fundamental :). Make sure you accept your own answer in this case so that people know your question has been answered.
ryanulit
The link to the source code is under the screenshot in the middle of the text:"You can download the whole thing here. (Very 0.1 but posted as an example/idea - just use the next / previous buttons to view some photos, get a feel of things)."
simply-tom