Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open a txt file
Message
 
 
À
17/09/2003 16:36:11
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00830099
Message ID:
00830103
Vues:
16
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform