Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy records on screen to text file
Message
De
03/04/2000 23:02:49
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, Caroline du Nord, États-Unis
 
 
À
31/03/2000 23:26:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00353388
Message ID:
00354760
Vues:
14
Dave, this is awesome! You have shown me some neat tools and I will use them on other apps as well.

Thanks so much, Brad.


>Try this:
>
>
>*!* Begin Code Sample
>
>PUBLIC x
>x = CREAT([oForm1])
>x.SHOW
>
>DEFINE CLASS oForm1 AS FORM
>	AUTOCENTER = .T.
>	ADD OBJECT button1 AS BUTTON
>	button1.LEFT = 150
>	button1.TOP = 200
>	button1.HEIGHT = 30
>	button1.CAPTION = [Quit]
>	ADD OBJECT CreatFileButton AS CreateFile
>	CreatFileButton.AUTOSIZE = .T.
>	CreatFileButton.LEFT = 100
>	CreatFileButton.TOP = 75
>	CreatFileButton.CAPTION = [Click to create the qlp file.]
>	ADD OBJECT txtbox1 AS TEXTBOX
>	txtbox1.VALUE = [54990]
>	ADD OBJECT txtbox2 AS TEXTBOX
>	txtbox2.VALUE = [22]
>	txtbox2.TOP = 25
>ENDDEFINE
>
>DEFINE CLASS BUTTON AS COMMANDBUTTON
>	CANCEL = .T.
>	PROC CLICK
>		RELEASE THISFORM
>	ENDPROC
>ENDDEFINE
>
>DEFINE CLASS CreateFile AS COMMANDBUTTON
>	PROC CLICK
>		STRING = ALLTRIM(THISFORM.txtbox1.VALUE) + CHR(10) + ;
>			ALLTRIM(THISFORM.txtbox2.VALUE)
>		STRTOFILE(STRING,[MyFile.qlp])
>		MODI FILE MyFile.qlp NOWAIT
>	ENDPROC
>ENDDEFINE
>
>*!* End Code Sample
>
>
>>I have a new application that needs to write the information showing in txt boxes on the form to a text file.
>>
>>example;
>>
>>txtbox1 shows part "54990"
>>txtbox2 shows quantity "22"
>>
>>each must be printed to a separate line, and the file must be created in a queue subdirectory with a .qlp extension(not a special file type just a name that another program will recognize)
>>
>>Thanks ahead of time.
>>
>>Brad.
He is there and He is not Silent.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform