Condividi tramite


Command Window

The Command window is a Visual FoxPro system window. When you choose menu commands, Visual FoxPro language commands are echoed in the Command window.

You can also type Visual FoxPro commands directly into the Command window. In the Command window, you can:

  • Delete text by pressing ESC if you haven't already pressed ENTER to execute the command.
  • Reissue a previous command by placing the cursor anywhere on the command line, and then pressing ENTER.
  • Re-issue a block of code by selecting it, and then pressing ENTER.
  • Split lengthy commands by typing a semicolon after a space in the command where you want it to break, and then pressing ENTER.
  • Move text within the Command window and to other editing windows. Select the desired text and drag it to the desired spot.
  • Copy text within the Command window and paste it into other editing windows without using Edit menu commands. Select the desired text, hold down CTRL, and then drag the text to the desired spot.

You can change font, line spacing and indentation by selecting the appropriate command from the Format Menu.

Right-click in the Command window to display a shortcut menu with these options:

  • Cut, Copy, Paste. Move or delete characters to and from the Command window.
  • Build Expression. Display the Expression Builder dialog box window, in which you can define an expression using commands, literals, fields, or other expressions. The expression you build is pasted into the Command window when you click OK.
  • Execute Selection. Execute the text selected in the Command window as a new command.
  • Clear. Remove the list of previously executed commands from the Command window.
  • Properties. Display the Edit Properties dialog box window in which you can change edit behavior, tab width, fonts, and syntax coloring options for the Command window.

Persistence of Contents

The contents of the Command window are saved to a file, _command.prg, automatically unless the noRecentDocHistory system policy is enabled or you are not using a Foxuser resource file. You can clear the window by selecting Clear from the Command Window shortcut menu. To enable its use by multiple instances of Visual FoxPro, the file is only read when starting Visual FoxPro, and written when exiting Visual FoxPro. The file is located in the same directory as the Foxuser resource file. You can determine or change the location of the resource file from the Options dialog box, File Locations tab, or via language using SET("RESOURCE") or SET RESOURCE respectively.

See Also

Edit Properties Dialog Box | Expression Builder Dialog Box | Editing Window | Operating the Command Window | Visual FoxPro Configuration | File Locations Tab, Options Dialog Box, | SET RESOURCE Command