Collect it. If you have time, read it again. And (MSN effect API)

Source: Internet
Author: User

Http://www.delphibbs.com/keylife/iblog_show.asp? Xid = 33357

 

Http://www.delphibbs.com/keylife/iblog_show.asp? Xid = 261

 

 

// ================================================ ==================

 

Private declare function animatewindow lib "USER32" (byval hwnd as long,
Byval dwtime as long, byval dwflags as long) as long

Where:
Hwnd is only valid for form, and other effects such as picture1 cannot be produced.
Dwtime is the animation duration. The default value is 200.
Dwflags has the following values:
Aw_hor_positive (& H1) 'opens the window from left to right
Aw_hor_negative (& H2) 'opens the window from right to left.
Aw_ver_positive (& h4) 'opens the window from top to bottom
Aw_ver_negative (& H8) 'opens the window from bottom to top.
Aw_center (& H10) 'cannot see any effect
Aw_hide (& h10000) 'This constant must be added if you want to use this function during form uninstallation
Aw_activate (& h20000) 'After the form is opened through this function, the focus will be lost by default, unless this constant is added
Aw_slide (& h40000) 'does not show any effect
Aw_blend (& h80000) 'fade-in and fade-out effect

The last one is what I am looking for. Unfortunately, it is only valid for Win2000. Below is the form fade-in effect,
If we don't have Win2000, we won't be able to see it:

Form1.borderstyle = 1
Form1.caption = ""
Form1.controlbox = ""
Attach a suitable background image to form1.

Private sub form_click ()
Unload me
End sub
Private sub form_unload (cancel as integer)
Animatewindow hwnd, 1000, & h80000 + & h10000
Set form1 = nothing
End sub
The animatewindow function adds a lot of colors to programs, especially for Win2000.

You can use it in Delphi by modifying it as appropriate.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.