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