C # result of the pop-up window in the lower right corner of winform

Source: Internet
Author: User
Using system. runtime. interopservices; [dllimport ("USER32")] Private Static extern bool animatewindow (intptr hwnd, int dwtime, int dwflags); // The following are available constants, declare the required private const int aw_hor_positive = 0x0001 according to the different animation results; // display the window from left to right, which can be applied in the migration transition animation and sliding animation. The private const int aw_hor_negative = 0x0002 is ignored when the aw_center flag is applied; // a window is displayed from the right to the left, which can be applied in the migration transition animation and slide animation. Ignore the private const int aw_ver_positive = 0x0004 when applying the aw_center flag; // display the window from top to bottom, which can be applied in the migration transition animation and slide animation. The private const int aw_ver_negative = 0x0008 is ignored when the aw_center flag is applied; // the bottom-up window is displayed, which can be applied in the migration transition animation and slide animation. When the aw_center flag is applied, ignore this flag. Private const int aw_center = 0x0010; // If the aw_hide flag is applied, the window overlaps inwards; otherwise, expand the private const int aw_hide = 0x10000; // The Private const int aw_active = 0x20000 in the concealed window; // activate the window, do not apply the private const int aw_slide = 0x40000 after applying the aw_hide flag; // apply the sliding animation result. The default value is to migrate to the animation type. When the aw_center flag is applied, this flag is ignored. Private const int aw_blend = 0x80000; // apply the fade-in and fade-out results. Private void form1_load (Object sender, eventargs e) {int x = scr Een. primaryscreen. workingarea. right-this. width; int y = screen. primaryscreen. workingarea. bottom-this. height; this. location = new point (x, y); // set the animation window (this. handle, 1000, aw_slide | aw_active | aw_ver_negative);} private void form=formclosing (Object sender, formclosingeventargs e) {animatewindow (this. handle, 1000, aw_blend | aw_hide);} // The second method is available below //// form animation function Note: reference system. ru Ntime. interopservices; ///// specify the handle of the window that generates the animation /// specify the animation duration /// specify the animation type, which can be a combination of one or more symbols. /// [Dllimport ("USER32")] Private Static extern bool animatewindow (intptr hwnd, int dwtime, int dwflags); // The following are available constants, declare the private const int aw_hor_positive = 0x0001 as needed based on different animation effects; // display the window from left to right, which can be used in rolling and sliding animations. Ignore the private const int aw_hor_negative = 0x0002 when using the aw_center flag; // display the window from the right to the left, which can be used in the scrolling and sliding animations. Ignore the private const int aw_ver_positive = 0x0004 when using the aw_center flag; // display the window from top to bottom, which can be used in rolling and sliding animations. Ignore the private const int aw_ver_negative = 0x0008 when using the aw_center flag; // display the window from bottom to top. This flag can be used in rolling and sliding animations. When the aw_center flag is used, ignore this flag. This flag is private const int aw_center = 0x0010. // If the aw_hide flag is used, the window overlaps inwards; otherwise, expand the private const int aw_hide = 0x10000; // hide the window private const int aw_active = 0x20000; // activate the window, do not use the private const int aw_slide = 0x40000 after the aw_hide flag is used; // use the sliding animation effect. The default value is the scroll animation type. When the aw_center flag is used, this flag is ignored. Private const int aw_blend = 0x80000; // use the fade-in and fade-out effect private void frmmsg_load (Object sender, eventargs e) {int x = screen. primaryscreen. workingarea. right-this. width; int y = screen. primaryscreen. workingarea. bottom-this. height; this. location = new point (x, y); // set the animation window (this. handle, 1000, aw_slide | aw_active | aw_ver_negative);} private void frmmsg_formclosing (Object sender, formclosingeventargs e) {animatewindow (this. handle, 1000, aw_blend | aw_hide );}

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.