Alaska Software Inc. - Show HTM -string ?
Username: Password:
AuthorTopic: Show HTM -string ?
Bengt OveliusShow HTM -string ?
on Wed, 29 Oct 2003 18:46:50 +0100
Which is the best way to display a HTM-coded
string  cHTM in Internet Explorer?

If  the filename
X.HTM
 is written at command prompt,
Internet Explorer starts OK

But so far it fails starting it from within a XBASE application


cFilNam := X.HTM
MEMOWRIT(cFilNam,cHTM)

* unsuccessful attempts:

RunShell( "/C "+ cFilNam )
RunShell( "/C START "+cFilNam )
RunShell( cFilNam,'',.T.)
RunShell( ' ' ,cFilNam,.T.)


There must be a way  !

Regards
Bengt Ovelius
Albert Tramper Re: Show HTM -string ?
on Wed, 29 Oct 2003 19:30:41 +0100
Bengt,

first i think you ment:

cFilNam := "X.HTM" //quoted

I tried:

cFilNam := "http://www.google.nl"
RunShell( "/C START "+cFilNam )

and this works fine, then i tried:

cFilNam := "Zomersalade.htm"  must be in the same map as the program
RunShell( "/C START "+cFilNam )

and this works fine too and last:

cFilNam:='x.htm'
MEMOWRIT(cFilNam,'TEST')
RunShell( "/C START "+cTemp )

Worked fine.

So sorry can't help or i do misunderstand the problem

Albert Tramper


Bengt Ovelius wrote:
> Which is the best way to display a HTM-coded
> string  cHTM in Internet Explorer?
> 
> If  the filename
> X.HTM
>  is written at command prompt,
> Internet Explorer starts OK
> 
> But so far it fails starting it from within a XBASE application
> 
> 
> cFilNam := X.HTM
> MEMOWRIT(cFilNam,cHTM)
> 
> * unsuccessful attempts:
> 
> RunShell( "/C "+ cFilNam )
> RunShell( "/C START "+cFilNam )
> RunShell( cFilNam,'',.T.)
> RunShell( ' ' ,cFilNam,.T.)
> 
> 
> There must be a way  !
> 
> Regards
> Bengt Ovelius
> 
>
Bengt OveliusRe: Show HTM -string ?
on Wed, 29 Oct 2003 19:50:26 +0100
Thanks a lot!
Now it works. I missed the quotes.


By the way:
Is there a way to display the HTM without
writing it to disk first ?
Phil Ide
Re: Show HTM -string ?
on Wed, 29 Oct 2003 19:58:21 +0000
Bengt,

> By the way:
> Is there a way to display the HTM without
> writing it to disk first ?

No. Even if you use the IE OCX, you need to write it to disk first.

As an alternative to using RunShell(), you could try this:

WinAPIOpen(cFile)

This uses Windows File Association to launch the relevant application (and
without opening a command prompt to do so).  You can also specify whether
the application is opened minimised, maximised, restored etc.

This is one of the functions available in my printerAPI package, which you
can doanload from the link in the sig block.

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

Next from Intel: the Repentium.