loForm=CREATEOBJECT("MyTextViewer",GETFILE(),"Text of View, Sample",2) loForm.SHow(1) DEFINE CLASS myTextViewer as _showtext OF (HOME(1)+"ffc\_reports.vcx") PROCEDURE INIT LPARAMETERS tcSourceFile,; && Path of the file to show tcCaption,; &&Window Title tnWindowState && Normal = 0, Minimazed = 1 , Maximazed =2 DODEFAULT(tcSourceFile) WITH This .Caption = IIF(VARTYPE(tcCaption)='C' AND !EMPTY(tcCaption),tcCaption,"Text Viewer") .WindowState=IIF(VARTYPE(tnWindowState)='N' AND INLIST(tnWindowState,0,1,2),tnWindowState,0) ENDWITH ENDPROC PROCEDURE Activate This.Resize() DODEFAULT() ENDPROC ENDDEFINEHTH