Dynamic effects of forms in VB

zhaozj2021-02-11  169

Dynamic effects of forms in VB

http://www.tongyi.net Author: Wei-Dong Jiang, Huayun Source: China Computer Education Views: 1161

In VB programming, the appearance and closing of the application form is generally static, but we use the following API function AnimateWindow to easily implement the dynamic effect of the form. The declaration of the API function AnimateWindow is as follows: Private Declare Function AnimateWindow LIB "User32" (byval dwtime as long) (byval dwflags as long): hwnd only valid for FORM; DWTIME is an animation, default value For 200; dwflags is an animation method, you can take && H1, && H2, && H4, && H5, && H10 a total of 8 values, represents around, right left, up and down, top left to the right, right to the left, down, The lower left to the upper right and the middle to four weeks. AW_HIDE = && H10000 If you want to use this function when you uninstall this function, you have to add this constant AW_ACTIVATE = && H20000 After you open this function, you will lose focus by default, unless you add your usual amount AW_SLIDE = && H80000 fades Fade out (for Win2000), we will give an example to let friends know the use of the AnimateWindow function. Example: From the upper left corner to the lower right corner, the form private subform_load () AnimateWindow Hwnd, 3000, && H5 Form1.Refresh End Sub is running in the PWIN98, VB6.0 Chinese Enterprise Edition.

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

New Post(0)