[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

avi

7/30/2010 3:47:00 PM

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

6 Answers

Tom Shelton

7/30/2010 4:10:00 PM

0

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


Larry Serflaten

7/30/2010 4:49:00 PM

0


"avi" <aviben@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


avi

7/30/2010 5:28:00 PM

0

Thanks but I need it it with as an html file

Regards
Avi

Kevin Provance

7/30/2010 5:41:00 PM

0


"avi" <aviben@bezeqint.net.il> wrote in message
news:7d0b54c8-8cf7-4988-92c2-ca5981d2e6d0@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

Jeff Johnson [MVP: VB]

7/30/2010 5:52:00 PM

0

"avi" <aviben@bezeqint.net.il> wrote in message
news:7d0b54c8-8cf7-4988-92c2-ca5981d2e6d0@g19g2000yqc.googlegroups.com...

> Thanks but I need it it with as an html file

Honestly, it's 2010. Learn HTML. It's not going anywhere and you'll be hard
pressed as a programmer to avoid it.


avi

7/30/2010 6:08:00 PM

0

Kevin's code works nicely

Many thanks
avi