Form trick effect

zhaozj2021-02-17  70

In VB programming, the appearance and closing of the application form are generally static, but we use the following API function Animate Window to easily implement the dynamic effect of the form.

The declaration of the API function Animate Window is as follows: Private Declare Function AnimateWindow LIB "User32" (Byval Dwtime As Long): HWND only valid for FORM; DWTIME is an animation, default The value is 200; DWFLAGS is an animation method, you can take & h1, & h2, & h3, & h4, & h5, & h6, & h8, & h9, and a total of 8 values, represents around, right left, up and down, left to the right, right up to the left , Lower, left to the right and middle to four weeks. AW_HIDE = & H10000 If you want to use this function when you uninstall, you have to add this constant. AW_ACTIVATE = & H20000 After the form is opened by this function, the focus will be lost by default, unless the original AW_SLIDE = & H40000 form moves slide out and slides into the AW_BLEND = & H80000 fade out (for Win2000): from the upper left corner Gradually display the form in the lower right corner

Private Sub Form_Load () AnimateWindow HWND, 3000, & H5 Forml.Refreshend Sub runs in PWIN98, VB6.0 Chinese Enterprise Edition. The value of dwflags can be used in port combinations, the effect is better

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

New Post(0)