From: avi on
Hello,

I want basically to create from vb6 an simple html file ("c:
\Image1.html") which will display a JPG image file ("c:\Image1.jpg")

I am not proficient at html

Is there a simple vb6 function to achieve this?

Regards
Avi

From: Tom Shelton on
avi used his keyboard to write :
> Hello,
>
> I want basically to create from vb6 an simple html file ("c:
> \Image1.html") which will display a JPG image file ("c:\Image1.jpg")
>
> I am not proficient at html
>
> Is there a simple vb6 function to achieve this?
>
> Regards
> Avi

There isn't a simple function built in. But, I might still have my old
cgi class library laying around - and that had a lot of functions for
dynamcially generating html.... I look around, and if I find it - I'll
post the code somewhere.

--
Tom Shelton


From: Larry Serflaten on

"avi" <aviben(a)bezeqint.net.il> wrote
>
> I want basically to create from vb6 an simple html file ("c:
> \Image1.html") which will display a JPG image file ("c:\Image1.jpg")
>
> I am not proficient at html
>
> Is there a simple vb6 function to achieve this?

In a word.... (no)

Internet Explorer will open and display a jpg file (as well as other image
files). Unless you want to add words, you do not need to create a page,
just open the file.

Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE ""D:\temp\einstein.jpg"""

LFS


From: avi on
Thanks but I need it it with as an html file

Regards
Avi
From: Kevin Provance on

"avi" <aviben(a)bezeqint.net.il> wrote in message
news:7d0b54c8-8cf7-4988-92c2-ca5981d2e6d0(a)g19g2000yqc.googlegroups.com...
: Thanks but I need it it with as an html file
:
: Regards
: Avi

Air code, not tested

Public Function ImgToHTML (ByVal sImage As String) As String
Dim sHTML As String

sHTML = "<HTML>"
sHTML = sHTML & "<BODY>"
sHTML = sHTML & "<img src=""" & sImage & """>"
sHTML = sHTML & "</BODY>"
sHTML = sHTML & "</HTML>"

ImgToHTML = sHTML
End Function

Then save your html string to a file with a .html extension

 |  Next  |  Last
Pages: 1 2
Prev: Protecting against accidental editing
Next: RegClean