-
Notifications
You must be signed in to change notification settings - Fork 5
/
NativeMethods.cs
40 lines (31 loc) · 1.24 KB
/
NativeMethods.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Drawing;
using System.Runtime.InteropServices;
//using Point=System.Windows.Point;
namespace Ulavali
{
public static class NativeMethods
{
internal const int GWL_EXSTYLE = -20;
internal const int SW_SHOWNA = 8;
internal const int SW_HIDE = 0;
internal const int SWP_NOACTIVATE = 0x0010;
internal const int WS_EX_TOOLWINDOW = 0x00000080;
internal static readonly IntPtr HWND_TOPMOST = new IntPtr(-1);
[DllImport("user32.dll")]
internal static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll")]
internal static extern bool SetWindowPos(
IntPtr hWnd, IntPtr hwndAfter, int x, int y,
int width, int height, int flags);
[DllImport("user32.dll")]
internal static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
internal static extern int SetWindowLong(IntPtr hWnd, int nIndex,
int dwNewLong);
[DllImport("user32.dll")]
internal static extern bool SetProcessDPIAware();
[DllImport("user32.dll")]
public static extern bool GetCursorPos(ref Point lpPoint);
}
}