PC Review


Reply
Thread Tools Rate Thread

OpenNetCF HTMLViewer - images

 
 
Hilton
Guest
Posts: n/a
 
      26th Dec 2004
Hi,

How can I embed images in HTML when using OpenNetCF's HTMLViewer?

Thanks,

Hilton


 
Reply With Quote
 
 
 
 
Sergey Bogdanov
Guest
Posts: n/a
 
      26th Dec 2004
Save your HTML into the file (e.g. test.html):

<html>
<body>
<img src="test.gif" />
</body>
</html>

.... and copy test.html, test.gif in the same directory with the application.

after that use:

string appDir =
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
htmlViewer.Url = "file://" + appDir + @"\test.html";

Sergey

Hilton wrote:
> Hi,
>
> How can I embed images in HTML when using OpenNetCF's HTMLViewer?
>
> Thanks,
>
> Hilton
>
>

 
Reply With Quote
 
Hilton
Guest
Posts: n/a
 
      26th Dec 2004
Sergey,

Thank you for your reply.

Assuming the HTML is internal (i.e. string url = "<html>...</html>", can I
use images embedded in the EXE? i.e. I'd prefer not to have lots of images
in the directory.

I guess I could write the embedded images to the directory, set the URL, the
delete the images once the HTMViewer has accessed them (if there's a way to
know when). This will be slow(er), but it is a solution.

Hilton


"Sergey Bogdanov" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Save your HTML into the file (e.g. test.html):
>
> <html>
> <body>
> <img src="test.gif" />
> </body>
> </html>
>
> ... and copy test.html, test.gif in the same directory with the

application.
>
> after that use:
>
> string appDir =
>

Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetN
ame().CodeBase);
> htmlViewer.Url = "file://" + appDir + @"\test.html";
>
> Sergey
>
> Hilton wrote:
> > Hi,
> >
> > How can I embed images in HTML when using OpenNetCF's HTMLViewer?
> >
> > Thanks,
> >
> > Hilton
> >
> >



 
Reply With Quote
 
Sergey Bogdanov
Guest
Posts: n/a
 
      26th Dec 2004
You can't embed image in the EXE (also I was trying use "res://" but
have no success). To known when the document is loaded completely, catch
the event "DocumentComplete" and after that delete your temporary images.

Hilton wrote:
> Sergey,
>
> Thank you for your reply.
>
> Assuming the HTML is internal (i.e. string url = "<html>...</html>", can I
> use images embedded in the EXE? i.e. I'd prefer not to have lots of images
> in the directory.
>
> I guess I could write the embedded images to the directory, set the URL, the
> delete the images once the HTMViewer has accessed them (if there's a way to
> know when). This will be slow(er), but it is a solution.
>
> Hilton

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenNETCF.Windows.Forms.HTMLViewer - links/images www.msmobiles.com Microsoft Dot NET Compact Framework 18 5th Jan 2004 11:25 PM
OpenNetCF's HTMLViewer Hollywood Microsoft Dot NET Compact Framework 4 19th Oct 2003 11:40 PM
OpenNETCF HtmlViewer Hilton Microsoft Dot NET Compact Framework 0 19th Sep 2003 08:25 AM
OpennetCF.org htmlviewer Erdem ALKILIÇGiL Microsoft Dot NET Compact Framework 0 23rd Jul 2003 02:55 PM
Opennetcf htmlviewer?? Timothy Taylor Microsoft Dot NET Compact Framework 5 23rd Jul 2003 12:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 AM.