Toasts – Blame information for rev 41
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
41 | office | 1 | using System; |
2 | using System.Runtime.InteropServices; |
||
3 | |||
4 | namespace Toasts |
||
5 | { |
||
6 | internal static class NativeMethods |
||
7 | { |
||
8 | #region Private Methods |
||
9 | |||
10 | /// <summary> |
||
11 | /// Gets the handle of the window that currently has focus. |
||
12 | /// </summary> |
||
13 | /// <returns> |
||
14 | /// The handle of the window that currently has focus. |
||
15 | /// </returns> |
||
16 | [DllImport("user32")] |
||
17 | internal static extern IntPtr GetForegroundWindow(); |
||
18 | |||
19 | /// <summary> |
||
20 | /// Activates the specified window. |
||
21 | /// </summary> |
||
22 | /// <param name="hWnd"> |
||
23 | /// The handle of the window to be focused. |
||
24 | /// </param> |
||
25 | /// <returns> |
||
26 | /// True if the window was focused; False otherwise. |
||
27 | /// </returns> |
||
28 | [DllImport("user32")] |
||
29 | internal static extern bool SetForegroundWindow(IntPtr hWnd); |
||
30 | |||
31 | /// <summary> |
||
32 | /// Windows API function to animate a window. |
||
33 | /// </summary> |
||
34 | [DllImport("user32")] |
||
35 | internal static extern bool AnimateWindow(IntPtr hWnd, int dwTime, int dwFlags); |
||
36 | |||
37 | [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] |
||
38 | internal static extern IntPtr CreateRoundRectRgn |
||
39 | ( |
||
40 | int nLeftRect, // x-coordinate of upper-left corner |
||
41 | int nTopRect, // y-coordinate of upper-left corner |
||
42 | int nRightRect, // x-coordinate of lower-right corner |
||
43 | int nBottomRect, // y-coordinate of lower-right corner |
||
44 | int nWidthEllipse, // width of ellipse |
||
45 | int nHeightEllipse // height of ellipse |
||
46 | ); |
||
47 | |||
48 | #endregion |
||
49 | } |
||
1 | office | 50 | } |