Arvind said:
thanks a lot..this was exactly i was looking for.
and few questions.
1. how to make the form to full screen (no taskbar, no menubar,etc)
See this:
http://groups-beta.google.com/group...FullScreen&qt_g=1&searchnow=Search+this+group
2. how to lead the webbrowser with some default page while loading instead
of clicking "Go"
say some files from local "file//\test.html"
see Navigate method.
3. how to get the events from the HTML?
example if the html has link of "exit" then the appliaction should exit.and
if html has "back" the application should process to go back
just like your "navigate" menu does with "GoBack" "GoHome"
any suggestions and ideas will be agreat help
Write link in this manner in your HTML text:
<a href="#cmd=exit">Exit</a>
After that you may handle Navigated event and see does Url contain
'#cmd=' token. Then just compare it with your command set and execute a
proper command:
Regex r = new Regex("#cmd=(.*)");
Match m = r.Match(htmlViewer.Url);
if (m.Success)
{
if (m.Groups[1].Value == "exit") Close();
...
}
Notice that you should modify OnNavigated method of WebBrowser.cs;
otherwise new url will not be set:
//set the new url
m_url = e.Url;
if(Navigated!=null)
{
Navigated(this,e);
}
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com