A method to share the results of c#winform in the lower right corner

Source: Internet
Author: User
This article mainly introduces C # WinForm implementation of the bottom right pop-up window results method, combined with the example form Analysis of C # window operation of the relevant skills, the need for friends can refer to the following

The example in this article describes how C # WinForm implements the results of the pop-up window in the lower right corner. Share to everyone for your reference, as follows:


Using System.Runtime.InteropServices; [DllImport ("user32")]private static extern bool AnimateWindow (INTPTR hwnd, int dwtime, int dwFlags);//The following are the available constants, The private const int aw_hor_positive = 0 x0001;//from the left-to-right display window, which can be applied in the migration Transitions animation and sliding animation, according to the non-animated result declaration itself. Ignoring the tag when applying the aw_center tag Private Const int aw_hor_negative = 0 x0002;//A right-to-left display window that can be applied in the migration Transitions animation and slide animations. Ignoring the tag when applying the aw_center tag Private Const int aw_ver_positive = 0 x0004;//A top-down display window that can be applied in the migration Transitions animation and slide animations. Ignoring the tag when applying the aw_center tag Private Const int aw_ver_negative = 0 x0008;//from the bottom up Display window, which can be applied in the migration Transitions animation and slide animations. Aw_center tag is applied when the tag is ignored when the tag is private const int aw_center = 0 x0010;//If the aw_hide tag is applied, the window overlaps inside; otherwise, the private const int aw_hide = 0 x 10000;//hidden window Private Const int aw_active = 0 x20000;//activation window, do not apply this tag after the aw_hide tag is applied to the private const int aw_slide = 0 x40000;//Application Sliding type animation results, default to the migration transition animation type, when the aw_center tag is applied, the tag is ignored private Const int aw_blend = 0 x80000;//Apply the fade result private void Form1_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);//setup form displays AnimateWindow (this) in the lower-right corner of the screen. Handle, Aw_slide | aw_active | aw_ver_negative);} private void Form1_formclosing (object sender, FormClosingEventArgs e) {AnimateWindow (this. Handle, Aw_blend | Aw_hide);}
Related Article

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.