Control the VFP program with Flash, expand your program function and interface

xiaoxiao2021-03-06  74

[Original] Control the VFP program with Flash, screamed your program function and interface

Yasur

With Flash, you can make a very beautiful interface and animation effect, and VFP is indeed in this regard, combining the advantages of the two is definitely an exciting thing, in an occasional one other programming language. The article combined with Flash, try to do it in the VFP, and the results are very satisfied. I think this should be a very meaningful thing, unlimited imagination. . . Look at the interface. . (For the Flash and VFP procedures temporarily made by the test effect, you will look at it.)

The related pictures of this topic are as follows: This topic is related to the following:

Let's talk about the specific steps: [1] Make Flash to make 4 buttons in Flash, which open, maximize, prompt, and close. The code is (all triggered when the mouse is released):

Open: on ("open" {fscommand ("open", "OpenTable");} Maximize: on ("max" {fscommand ("max", "windowsmax");} Tip: On (Release) {fscommand ("MSG "," msgbox ");} Close: ON (Release) {fscommand (" exit "," close ");} FSCOMMAND () in the above code is used in FLASH to perform external commands. The parameter is used to identify the click button and its value.

This is also the place where Flash is released as SWF files, saved to where you know.

[2] Write a VFP program

Use a form to try it first. Insert a flash component in the form, note: This component is the official component of Macromedia. Before Flash5.0, it is swflash.ocx, which is a flash.ocx file, if Flash this file is installed in C: / Windows / System32 / MacOrMed / Flash / medium. Register this component and insert it into the form.

Add a table in the form, name YGRID1. Then write the following code in the FSCommand () method of the flash object (you should understand what is going on when you pass the parameters of this method): do case case command = "open" LOCAL FileName FileName = GETFILE ( "dbf") IF! EMPTY (FileName) USE (FileName) thisform.ygrid1.RecordSource = "" thisform.ygrid1.RecordSource = ALIAS () thisform.Refresh ENDIF CASE command = "max" ThisForm.windowState = 2 case command = "MSG" MessageBox ("Flash VFP may make your program have a lot of color," Yasur "," Yasur ") case command =" exit "thisform.Release endcase

Ok, execute a form, big success. . .

You can play any: Beautiful Flash professional VFP program. Should not let you down. It may not be quite detailed, there is a problem, everyone discussed, this is just Flash combined with VFP's iceberg, I believe there is more exciting function.

转载请注明原文地址:https://www.9cbs.com/read-120658.html

New Post(0)