Press "Enter" to skip to content

VFP: Learn How to Create Program (.prg) File in Visual FoxPro

In this tutorial, you will learn how to create a program (.prg) file in Visual FoxPro.

The method of creating a program (.prg) file is the same in all versions of Foxpro. Give the following command in the Visual FoxPro command window:

Command to Create Program (.prg) File in Visual FoxPro

MODIFY COMMAND myprog

or in short form:

MODI COMM myprog

In this case, a file myprog.prg will create and will open in the editor. There you can write your program. The following is an example of the .prg file in Visual FoxPro:

Visual FoxPro Program File Example

In the following program, it will set the settings for Visual FoxPro environment and will call a Form named “mmenu”.

CLEAR
CLOSE ALL
SET SYSMENU TO DEFAULT
SET STATUS BAR OFF
SET HOURS TO 24
*SET STATUS BAR ON
*SET SYSMENU OFF
SET EXCLUSIVE OFF
SET AUTOSAVE ON
SET REFRESH TO 5
SET EXACT ON
SET SAFE OFF
SET TALK OFF
SET DELETED ON
SET RESOURCE OFF
** SET REPROCESS TO AUTOMATIC
SET REPROCESS TO 5
SET CENTURY ON
SET DATE british
MODIFY WINDOW SCREEN TITLE "Hotel Management" ICON FILE ".\handshak.ico"
_SCREEN.WINDOWSTATE = 2
CLOSE DATA
DO FORM mmenu
CLOSE DATA
SET SYSMENU ON
SET SYSMENU TO DEFA
ON ERRO
CLEAR
RETURN

Vinish Kapoor

Hi, I am a full stack developer and writing about development. I document everything I learn and help thousands of people. foxinfotech.in is created, written, and maintained by me; it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub, and get notifications for new posts.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *