I am testing live preview inside VS Code.
Preview your html files in VS Code itself. Use it to quickly set the html and css right for your webpages.
Do you know it live preview is also working for mod harbour?
Best regards,
Otto
![Image](https://mybergland.com/fwforum/livepreview.jpg)
<TD WIDTH=50%
ALIGN=RIGHT
BGCOLOR="#5b9bd5"
STYLE="padding: 18px;" >
do while alltrim(oIe:document:readyState) <> 'complete'
Otto wrote:Hello Marc,
please send me your source code.
Best regards,
Otto
#INCLUDE "fivewin.CH"
function Main(cAufruf)
local oBtn
local I := 0
local oDlg, oFont, n, oFontBrw, oBTNSave
local nWidth := GetSysMetrics( 0 ) * 2/4
local nHeight := GetSysMetrics(1 ) * 3/4
local cTitle := "/i zi' pi zi/ ***** Reportgenerator"
*----------------------------------------------------------
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-18
DEFINE FONT oFontBrw NAME 'TAHOMA' SIZE 0,-26
DEFINE DIALOG oDlg SIZE nWidth,nHeight PIXEL FONT oFont
@ 20,20 SAY cTitle OF oDlg PIXEL FONT oFontBrw
@ ( nHeight - 90 ) / 2.05,nWidth/5/2.05 ;
FLATBTN oBTNSave ;
PROMPT "Speichern" ;
SIZE 2, ( 32 ) /2.05 ;
OF oDlg ;
ACTION ( test( ) )
@ ( nHeight - 90 ) / 2.05,nWidth/5/2.05+100 ;
FLATBTN oBTNSave ;
PROMPT "Abbruch" ;
SIZE 2, ( 32 ) /2.05 ;
OF oDlg ;
ACTION (oDlg:End())
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return (0)
//----------------------------------------------------------------------------//
FUNCTION test()
Local aHoogte := {10,10,10,10,40,10,10,10,10,10}
local aBreedte := {50,50,50,50,100,50,50}
local aTekst := {{1,2,3,4,5,6,7},{11,12,13,14,15,16,17},{21,22,23,24,25,26,27},{31,32,33,34,35,36,37},{41,42,43,44,45,46,47},{51,52,53,54,55,56,57},{61,62,63,64,65,66,67},{71,72,73,74,75,76,77},{81,82,83,84,85,86,87},{91,92,93,94,95,96,97}}
local vhtml
vhtml = mHTMLtabel(aHoogte,aBreedte,aTekst)
memowrit('C:\_vmsdata\FWH64\projects\_test\printhtml\test.html',vhtml)
PrintHtml('C:\_vmsdata\FWH64\projects\_test\printhtml\test.html',1,.t.)
RETURN
//----------------------------------------------------------------------------//
#Define OLECMDID_PRINT 6
#Define OLECMDEXECOPT_PROMPTUSER 1
#Define OLECMDEXECOPT_DONTPROMPTUSER 2
#Define OLECMDID_ENABLE_INTERACTION 36
#Define OLECMDID_PRINTPREVIEW 7
#Define OLECMDID_SAVEAS 4
#Define OLECMDID_PAGESETUP 8
#Define OLECMDID_CUT 11 //Shear
#Define OLECMDID_NEW 2 //Create a new document
#Define OLECMDID_EXITFULLSCREEN 81
#Define OLECMDID_SAVE 3 //Preservation
#Define OLECMDID_SETTITLE 28 //Fehler
#Define OLECMDID_ZOOM 19
// enable print background and images in IE
function PrintHtml ( cHtmlOrUrl, nCopies,lShow )
static oIe, oWnd, oPrn
local i
*----------------------------------------------------------
default lShow:=.f.,nCopies:=1
oIe = TActiveX():New( NIL, "Shell.Explorer" )
oIe:Do( "Navigate2", cHtmlOrUrl)
do while alltrim(oIe:document:readyState) <> 'complete'
sysrefresh()
waitseconds(.5)
enddo
if lshow
oIe:Do( "ExecWB", OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_PROMPTUSER, OLECMDID_PAGESETUP, OLECMDID_CUT )
else
for i=1 to nCopies
msgwait('Printing large receipt (' + alltrim(str(i)) + ' of '+alltrim(str(nCopies))+' copies).',,2)
oIe:Do( "ExecWB", OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER )
next i
endif
sysrefresh()
oIe:end()
RETURN nil
//----------------------------------------------------------------------------//
func mHTMLtabel(aHoogte,aBreedte,aTekst)
local vHTML := ''
local vrij
local vkol
vHTML += '<HTML><TABLE border="1">'+ CRLF
FOR vrij = 1 to len(aHoogte)
vHTML += '<TR style="height: '+alltrim(str(aHoogte[vrij],10,0))+'px;">'+CRLF
FOR vkol = 1 to len(aBreedte)
IF valtype(atekst[vrij,vkol]) = 'N'
vHTML += '<TD style="width: '+str(aBreedte[vkol],10,5)+'px;"> '+str(atekst[vrij,vkol])+'</TD>'+CRLF
ELSEIF valtype(atekst[vrij,vkol]) = 'C'
vHTML += '<TD style="width: '+str(aBreedte[vkol],10,5)+'px;"> '+atekst[vrij,vkol]+'</TD>'+CRLF
ELSE
vHTML += '<TD style="width: '+str(aBreedte[vkol],10,5)+'px;"> </TD>'+CRLF
ENDIF
NEXT vkol
vHTML += '</TR>'+CRLF
NEXT vrij
vHTML += '</TABLE></HTML>'+CRLF
return vHTML
//----------------------------------------------------------------------------//
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 36 guests