Look at the example of VFP: Using the top-level form to make software main interface

Source: Internet
Author: User
Tags requires

This article is to make a top-level form for the system's main interface, run the interface to see the end of this article, complete this example to run this form and execute the actions specified in the menu. Of course, this is just a main form, it also requires a system user login validation form to invoke this form, as well as the main program and the links, publishing and other operations, in the following examples will be described in the example.

This example makes the following steps:

A new form, set its Caption property value to "programming introductory Web Site management System", the Width property value set to the 600,height property value set to the 400,autocenter property value set to. T, and save the form as "primary form. Scx".

Set the ShowWindow property value of the form to "2-as a top-level form", this step is very important, first of all because look at the example of VFP: Make only from the top table monotonous system main menu in this case, the menu has been set to only be called from the top level form, and secondly, Using the top-level table monoculture software main interface requires _screen in the main program. Visible=. F. Statements hide the main screen, and if the form is not set to the top-level form, the result is that even the form is hidden together.

Third, set the Picture property of the form for you in the working directory, I use the "landscape." JPG, you can also choose one that you like.

Iv. Adding event Codes

(i). Init event code for the form:

Do MAIN. MPR with THIS,.T. && Invoke Main Menu

(ii). Unload events for the form:

Close all
Clear Events
Quit

Run "main form. Scx", the interface is shown in the following figure:

At this point you can perform the actions specified in the menu, such as I clicked "Browse Data" under "Data Operation", the interface is as follows:

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

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

Related Article

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.