Tutorials to .com

Tutorials to .com » Software » Vfp » Animation of simulation in the VFP

Animation of simulation in the VFP

Print View , by: iSee ,Total views: 34 ,Word Count: 478 ,Date: Sat, 18 Apr 2009 Time: 9:07 PM


Author: free programming

In today's large number of programming languages, VFP's simple, convenient and practical so that I have been. It not only provides small and medium-sized databases to improve the management and operation mechanism, the application interface design also provides a wealth of means. For example, vfp Form Designer provides the image control, allowing us to add directly in the form. BMP picture. Slightly less than that it does not support other image formats, not to mention is the animation. As the image control and other controls, as has its own set of attributes, in the design can change it dynamically, so Iin practice a viable alternative in the VFP form to add a simulated "animation." The design idea is to prepare a few coherent frame. BMP images (can be related to the production of mapping software), use the timer function of time, in the time intervals change dynamically displayed. BMP images. I through a presentation on examples to illustrate this. First of all, I have prepared a consistent 4 flag floating image, respectively, named: 1.bmp, 2.bmp, 3.bmp and 4.bmp. As shown right. Then use the design form design form as follows: presentation of three control forms including: Image (image), Timer (timer) and Command (command button). Set the following attributes: Image.Picture = 1.bmpTtimer.Enabled =. t.Timer.Interval = 200Command.Caption = from the demonstration of the Activate event in the form add the following code: Public II = 1 in the timer's Timer event to add code is as follows: If I> = 4I = 1ElseI = I +1 EndifPic = Str (I, 1) + ". bmp" Thisform.Image.Picture = Pic of the command button Click event add the following code: Thisform.Release Finally, the preservation of and run the form, we will see a window in a bright red flag fluttered in the breeze. Click "Exit demo" command button, analog animation the end of the presentation.


Visual FoxPro Tutorial Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.