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);}