Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open a txt file
Message
From
17/09/2003 16:47:13
 
 
To
17/09/2003 16:36:11
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00830099
Message ID:
00830103
Views:
14
What is the easiest way to open a text file from a form command button?
You can use Text Viewer from FFCs:
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  
ENDDEFINE 
HTH
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Previous
Reply
Map
View

Click here to load this message in the networking platform