Look at the case study VFP: Main program and the integrated example of the link

Source: Internet
Author: User
Tags exit

This article gives a simple main program and makes the simple system that we make into an executable file. This example uses the top-level form as the main interface of the software, running even PostScript EXE will first appear require user name and password login form, the following figure:

3 consecutive errors of the user name and password will automatically exit, enter the correct username and password, the login form to hide and start the main form, the following figure:

The main point of this example: Because using the top-level form master interface, you need to add a _screen.visible=.f to the main program. Shielding the main screen; The primary form is the top-level form, and the ShowWindow property value of the form called by the main form menu module should be set to 1-in the top-level form , the System initialization section adds read events, and there should be a clear event in the unload or queryunload of a form that involves a system exit, and a form that is invoked by modules in the main form menu.

Production steps:

First, because it involves connecting the executable file and system release, so we set up a project file, save as "project 1.pjx".

In the project manager, select Programs under All or code, click the New button on the project manager to create a program file, and enter the following code:

Cc=sys
start=at (":", cc)-1
cend=rat ("\", cc,1)
set Default to (Substr (cc,start,cend-start+1))
_ Screen.visible=.f.
Set talk off
set Sysmenu to do
form system login
Read Events

Save the program file as "Main.prg", and the project manager that saves the program files is shown below:

Third, according to the previous examples "to see the example of VFP: The table records to locate and find operations", "look at the example of VFP: To add records to the datasheet and verify that the input data is legitimate", see the example of VFP: The record in the data table to modify "," see the example of VFP: Delete data table Records ", "Look at the case of VFP: Production system Login Form" and "look at the case study VFP: Using the top-level form to make the Software master interface, set up" Locate and find the records in the table "in the project manager. Scx", "Add records to a datasheet, and verify that the input data is legitimate. Scx", " Make changes to the records in the datasheet. Scx and deletes records in a datasheet. Scx "," System login. Scx "," main form. Scx "These 6 forms, according to" Look at the case of VFP: the production can only be monotonous from the top table system main Menu "a case of the establishment of the main menu main.mpr. If all of these instances have already been done, you can copy the files from these instances to the directory where the project files reside and add them to the categories you belong to in the project manager.

Setting the main file: Right-click MAIN.PRG in the project manager and check the "Set Master File" command on the shortcut menu, as shown below:

Select MAIN.PRG in the Project manager, click the "link" command in the lower-right corner of the project manager, and set the following figure in the compiling dialog box that pops up:

After setting, click OK, and in the Save As dialog box that pops up, name the PostScript application name "Programming portal site Management System.", and then click the Save button in the dialog box to complete the link.

VII, the release of the program (making installation disk) Please refer to: Software compilation and build installation disk: Http://bianceng.cnhttp://www.bianceng.cn/cc/cc9.htm, here will not repeat.

This example code is debugged in the win2003+vfp6.0 environment.

See the full set of "rookie also learn VFP" tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.