OpenNETCF Webbrowser or visualize a html-file

W

Wolfgang Maier

Hi,

I have to show a html-file without other navigation on WinCE 4.2 and .Net
1.1

I try to use the Web-Browser from OpenNETCF V 1.4

But I don't understand to handle this part and I have'nt found any help
about V 1.4

I only want to open a form with 'frm.ShowDialog()' and show the html-file.

Can anybody help me and send a part of code, how to initialize and activate
the control and make it visible ?

thx.
 
P

Paul G. Tobey [eMVP]

There are a number of factual errors in your message, so we'd better get
those corrected before anything else.

1. You are running on Windows CE, not Windows Mobile/Pocket PC? If so, the
way I remember it, the Web browser control in OpenNETCF SDF 1.4 was *only*
for the control on Windows Mobile, so would not work if you tried to run it
on Windows CE with the usual choice of the Internet Explorer browser. In
that case, there is no htmlview control, so nothing will happen.

2. There is no .NET 1.1 on Windows CE. We'll presume that you mean .NET CF
1.0.

Paul T.
 
W

Wolfgang Maier

Hi Paul,
There are a number of factual errors in your message, so we'd better get
those corrected before anything else.
Sorry about that.
2. There is no .NET 1.1 on Windows CE. We'll presume that you mean .NET
CF 1.0.
Yes, thats correct, my mistake.
1. You are running on Windows CE, not Windows Mobile/Pocket PC? If so,
the way I remember it, the Web browser control in OpenNETCF SDF 1.4 was
*only* for the control on Windows Mobile, so would not work if you tried
to run it on Windows CE with the usual choice of the Internet Explorer
browser. In that case, there is no htmlview control, so nothing will
happen.
Yes. I'm running on Windows CE.
Is there really no way to show html-files in html-style ?
 
P

Paul G. Tobey [eMVP]

Well, you can use the same control that the Internet Explorer application
IESample uses, but it's not a simple API; it's an ActiveX control. ActiveX
from .NET CF 1.0 is not a simple matter and I've never done it that I can
remember. You might be better off either writing your program in C/C++, if
this display-some-HTML operation is a big part of what you do, or figure out
another way to display the data, if it's a minor feature. If you're
determined that HTML is the only way to go, don't want to find/buy a
third-party rendering engine to draw it for you, and can't change to C/C++,
there have been a number of articles over the years, all referenced in the
archives of this group, no doubt, that talk about doing this. Search and
read...

http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/topics

Paul T.
 
W

Wolfgang Maier

Hi Paul,

I've searched, but nothing found, that helps me.

Maybe my last question:
What's about to start the IE out of C# with the html-file as parameter ?
Ist that a way and when, how ?

Or can I install (copy to the executionpath) .NetCF 2.0 or some assemblies
of 2.0 and work with it ?

I have to user HTML, because the main-server-program serves the files and
the desktop-clients needs it as html.
 
P

Paul G. Tobey [eMVP]

Yes, you can do that. You'll have to P/Invoke CreateProcess(), since you're
using .NET CF 1.0, but you should be able to do that. However, it's not
necessarily true that you can do something sensible when IE is already
running and you want to display a second page. That is relatively
difficult, without starting a second instance of IE, which means you then
have two running or you need to work out how to kill the first one.

Yes, you should be able to install 2.0, but exactly how you do that will
depend on who you are relative to your target device (are you the guys
building the OS for it?), and what the actual device attributes are. Since
you didn't say...

Paul T.
 
W

Wolfgang Maier

Hi Paul,

Thank you for your help.
Yes, you should be able to install 2.0, but exactly how you do that will
depend on who you are relative to your target device (are you the guys
building the OS for it?), and what the actual device attributes are.
Since you didn't say...
No, we don't build the OS, we only use a industrial scanner-handheld.
running and you want to display a second page. That is relatively
difficult, without starting a second instance of IE, which means you then
have two running or you need to work out how to kill the first one.
Thats the reason, why I want it to show embedded in the program., so the
user has to close the window for further work.

And the last information from our guys, who works now by the client, was,
that they don't need a webpage with a picture on the handheld.
And a normal textfile, I can show without problems, when I get rid off the
html-tags, I hope.

But now, I know, thats better to buy handhelds with more modern OS for our
next client ;)

Thank you for your patience.
 
P

Paul G. Tobey [eMVP]

Well, you can install .NET CF 2.0, I would guess. Generally, in an effort
to keep everything compatible for as long as possible, industrial device
OEMs try not to change things like the framework version. Changing to .NET
CF 2.0 forces you to use a different version of SQL Server CE, for example,
which does not use the same file format as the earlier version of SQLCE.
The net result is that, by making what seems like an innocuous and
compatible change, going to .NET CF 2.0, you've assured that all existing
field applications that use the database will break when executed on new
hardware.

Paul T.
 
D

diogoriba

Well, you can install .NET CF 2.0, I would guess. Generally, in an effort
to keep everything compatible for as long as possible, industrial device
OEMs try not to change things like the framework version. Changing to .NET
CF 2.0 forces you to use a different version of SQL Server CE, for example,
which does not use the same file format as the earlier version of SQLCE.
The net result is that, by making what seems like an innocuous and
compatible change, going to .NET CF 2.0, you've assured that all existing
field applications that use the database will break when executed on new
hardware.

Paul T.


Thank you for your help.
No, we don't build the OS, we only use a industrial scanner-handheld.
Thats the reason, why I want it to show embedded in the program., so the
user has to close the window for further work.
And the last information from our guys, who works now by the client, was,
that they don't need a webpage with a picture on the handheld.
And a normal textfile, I can show without problems, when I get rid off the
html-tags, I hope.
But now, I know, thats better to buy handhelds with more modern OS for our
next client ;)
Thank you for your patience.

I'm just looking for a clarification:
I'm having the same problem, but I'm actually running on CF 3.5. Will
I be able to use the OpenNetCF SDF 1.4 WebBrowser control even if I'm
not running on Windows Mobile? (I'm using CE too)
 
C

Chris Tacke, MVP

If you're using CF 3.5, why not use it's Browser control?

-Chris

diogoriba said:
Well, you can install .NET CF 2.0, I would guess. Generally, in an
effort
to keep everything compatible for as long as possible, industrial device
OEMs try not to change things like the framework version. Changing to
.NET
CF 2.0 forces you to use a different version of SQL Server CE, for
example,
which does not use the same file format as the earlier version of SQLCE.
The net result is that, by making what seems like an innocuous and
compatible change, going to .NET CF 2.0, you've assured that all existing
field applications that use the database will break when executed on new
hardware.

Paul T.


Thank you for your help.
Yes, you should be able to install 2.0, but exactly how you do that
will
depend on who you are relative to your target device (are you the guys
building the OS for it?), and what the actual device attributes are.
Since you didn't say...
No, we don't build the OS, we only use a industrial scanner-handheld.
running and you want to display a second page. That is relatively
difficult, without starting a second instance of IE, which means you
then
have two running or you need to work out how to kill the first one.
Thats the reason, why I want it to show embedded in the program., so
the
user has to close the window for further work.
And the last information from our guys, who works now by the client,
was,
that they don't need a webpage with a picture on the handheld.
And a normal textfile, I can show without problems, when I get rid off
the
html-tags, I hope.
But now, I know, thats better to buy handhelds with more modern OS for
our
next client ;)
Thank you for your patience.

I'm just looking for a clarification:
I'm having the same problem, but I'm actually running on CF 3.5. Will
I be able to use the OpenNetCF SDF 1.4 WebBrowser control even if I'm
not running on Windows Mobile? (I'm using CE too)
 
P

Paul G. Tobey [eMVP]

No. The Web browser control that the OpenNETCF object wraps is a Windows
Mobile component.

Paul T.

diogoriba said:
Well, you can install .NET CF 2.0, I would guess. Generally, in an
effort
to keep everything compatible for as long as possible, industrial device
OEMs try not to change things like the framework version. Changing to
.NET
CF 2.0 forces you to use a different version of SQL Server CE, for
example,
which does not use the same file format as the earlier version of SQLCE.
The net result is that, by making what seems like an innocuous and
compatible change, going to .NET CF 2.0, you've assured that all existing
field applications that use the database will break when executed on new
hardware.

Paul T.


Thank you for your help.
Yes, you should be able to install 2.0, but exactly how you do that
will
depend on who you are relative to your target device (are you the guys
building the OS for it?), and what the actual device attributes are.
Since you didn't say...
No, we don't build the OS, we only use a industrial scanner-handheld.
running and you want to display a second page. That is relatively
difficult, without starting a second instance of IE, which means you
then
have two running or you need to work out how to kill the first one.
Thats the reason, why I want it to show embedded in the program., so
the
user has to close the window for further work.
And the last information from our guys, who works now by the client,
was,
that they don't need a webpage with a picture on the handheld.
And a normal textfile, I can show without problems, when I get rid off
the
html-tags, I hope.
But now, I know, thats better to buy handhelds with more modern OS for
our
next client ;)
Thank you for your patience.

I'm just looking for a clarification:
I'm having the same problem, but I'm actually running on CF 3.5. Will
I be able to use the OpenNetCF SDF 1.4 WebBrowser control even if I'm
not running on Windows Mobile? (I'm using CE too)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top