HTML on APPS?

  • Thread starter Thread starter Arvind
  • Start date Start date
A

Arvind

Hello,

Is it possible to embedd HTML Browser (PocketIE) on the VB.NET or C# APPS?

like that of evc++.

any sample apps or code will be a great help.
 
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)

2. how to lead the webbrowser with some default page while loading instead
of clicking "Go"
say some files from local "file//\test.html"


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

Thanks once again

Arvind




--
----------------------------------------------------------------------------
------------------------------------
"eRiva Systems" - Where Technology Meets Life, Every Minute.

e-Mail : (e-mail address removed)

Web Site: www.erivasystems.com

Yahoo Messenger : arvish27
 
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
 
Thanks a lot for your help



--
----------------------------------------------------------------------------
------------------------------------
"eRiva Systems" - Where Technology Meets Life, Every Minute.

e-Mail : (e-mail address removed)

Web Site: www.erivasystems.com

Yahoo Messenger : arvish27
Sergey Bogdanov said:
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
 
Back
Top