Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy records on screen to text file
Message
From
31/03/2000 23:26:31
 
 
To
31/03/2000 11:35:26
Brad Stickley
Parker Pneumatic Div. North America
Wake Forest, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00353388
Message ID:
00353815
Views:
16
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform