Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adjust font for main Foxpro window

Status
Not open for further replies.

mroth36

Programmer
Jul 21, 2005
27
From the command window, I do a 'dir' and get a list of files. Each file listing (file name size etc.) displays on 2 lines. Is there a way to set this window to a smaller font so that each file will only display on 1 line? Also, can you send this display to text file (it whould be useful for documentation etc.).

Thank You
 
Try holding down the shift key, then clicking on 'Format' on the main menu. You can set the screen font from there.

To get the listing to a file, use:
LIST FILES TO somefile.txt

You can do the same thing for table structures, and for that matter, table contents:
LIST STRUCTURE TO FILE somefile.txt
LIST TO FILE somefile.txt


-Dave Summers-
[cheers]
Even more Fox stuff at:
 

Mroth,

You can also do it like this:

_SCREEN.Fontsize = 9 && or some other small number

To send it to a text file:

SET ALTERNATE TO MyTextFile.TXT
SET ALTERNATE ON
DIR && or any other commands that output to the screen
SET ALTERNATE OFF
SET ALTERNATE TO

A bit long-winded, but it should do the trick.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Code:
DIR TO MyDir.TXT
MODI FILE MyDir.TXT
but this is not good formated file. If you want the listing to loog good, perform your own DIR function, something like:

Code:
MyDir()
MyDir([MyFile.Txt])

FUNCTION MyDir(lcMask, lcFileName)

 lcMask = IIF(EMPTY(lcMask),"*.DBF",lcMask)
 IF VARTYPE(lcFileName) == "C"
    SET PRINTER TO (lcFileName)
    SET PRINT ON
    SET CONSOLE OFF
 ENDIF
 LOCAL lnFiles, laFiles[1], lnFor
 lnFiles = ADIR(laFiles,lcMask)
 FOR lnFor = 1 TO lnFiles
     ? laFiles[lnFor,1],laFiles[lnFor,2],laFiles[lnFor,3],laFiles[lnFor,4]
 NEXT

 IF VARTYPE(lcFileName) == "C"
    SET PRINT OFF
    SET PRINTER TO
    SET CONSOLE ON
 ENDIF

RETURN ""

this is not a good function, it needs a lot of improvements, but you got the idea.

Borislav Borissov
 
Thank You So Much, it works fine!!!
 

Mroth,

Thank You So Much, it works fine!!!

Glad it works, but it would be helpful if you could mention which solution "works fine". You've been given three sets of suggestions. For the benefit of others, it would be interesting to know which of them worked for you and which didn't.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top