PJ Fernandez
Check out this thread from the Seattle users group.
toggle quoted message
Show quoted text
P.J. -----Original Message-----
From: Calvin Hsia [mailto:calvinh@...] Sent: Wednesday, March 17, 2004 6:44 PM To: davidfung99; seattlevfpsig@... Subject: RE: [seattlevfpsig] print to command line VFP is a windows application and thus cannot output to the console. (Same as NotePad) However, you can show a messagebox based on user parameters. You need a config.fpw with "screen=off" if you don't want to show the VFP desktop until parameters have been validated. You might want to try posting questions at www.universalthread.com TEXT to cprog screen=off ENDTEXT STRTOFILE(cprog,"config.fpw") TEXT to cprog PROCEDURE testxx(parm1,parm2) IF TRANSFORM(parm1) = "/?" MESSAGEBOX(TRANSFORM(parm1)+":"+TRANSFORM(parm2)) ELSE _screen.Visible= .T. && if you want ox=NEWOBJECT("form") && your application ox.addobject("btn","commandbutton") ox.btn.caption="Click me" ox.btn.visible=.t. ox.show(1) ENDIF ENDTEXT ERASE testxx.p* MODIFY PROJECT testxx nowait STRTOFILE(cprog,"testxx.prg") _vfp.ActiveProject.Files.Add("testxx.prg") _vfp.ActiveProject.Files.Add("config.fpw") _vfp.ActiveProject.Close BUILD EXE testxx FROM testxx RELEASE WINDOWS tesxx !/n testxx /? -----Original Message----- From: davidfung99 [mailto:davidfung@...] Sent: Wednesday, March 17, 2004 2:41 PM To: seattlevfpsig@... Subject: [seattlevfpsig] print to command line Hi, I have written a command line program in FoxPro, but couldn't figure out a way to print to the command line, e.g. print the program usage if the wrong parameters are supplied by the user. Is there a way to do so? Thanks, David For FoxPro Community news visit: Yahoo! Groups Links For FoxPro Community news visit: Yahoo! Groups Links --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (). Version: 6.0.622 / Virus Database: 400 - Release Date: 3/13/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (). Version: 6.0.622 / Virus Database: 400 - Release Date: 3/13/2004 |