Definition at line 7 of file Win32.cs.
◆ GetActiveWindowTitle()
| static string BioCore.Win32.GetActiveWindowTitle |
( |
| ) |
|
|
static |
It gets the title of the active window
- Returns
- The title of the active window.
Definition at line 105 of file Win32.cs.
106 {
107 const int nChars = 256;
108 StringBuilder Buff = new StringBuilder(nChars);
110
112 {
113 return Buff.ToString();
114 }
115 return null;
116 }
static int GetWindowText(IntPtr hWnd, StringBuilder text, int count)
static IntPtr GetForegroundWindow()
◆ GetAsyncKeyState()
| static short BioCore.Win32.GetAsyncKeyState |
( |
System.Windows.Forms.Keys | vKey | ) |
|
◆ GetForegroundWindow()
| static IntPtr BioCore.Win32.GetForegroundWindow |
( |
| ) |
|
◆ GetKeyState()
| static bool BioCore.Win32.GetKeyState |
( |
System.Windows.Forms.Keys | vKey | ) |
|
|
static |
It returns true if the key is pressed, and false if it isn't
- Parameters
-
| vKey | The key you want to check. |
- Returns
- The return value is a short integer with the high order bit set if the key is down and the low order bit set if the key was pressed after the previous call to GetAsyncKeyState.
Definition at line 20 of file Win32.cs.
21 {
23 if (si == 0)
24 return false;
25 else
26 return true;
27 }
static short GetAsyncKeyState(System.Windows.Forms.Keys vKey)
◆ GetWindowRect()
| static bool BioCore.Win32.GetWindowRect |
( |
IntPtr | hwnd, |
|
|
ref Rect | rectangle ) |
GetWindowRect() returns the coordinates of the window's upper-left and lower-right corners in screen coordinates.
- Parameters
-
| IntPtr | A pointer to a window handle. |
| Rect | A struct that contains the coordinates of the upper-left and lower-right corners of the rectangle. |
◆ GetWindowText()
| static int BioCore.Win32.GetWindowText |
( |
IntPtr | hWnd, |
|
|
StringBuilder | text, |
|
|
int | count ) |
◆ mouse_event()
| static void BioCore.Win32.mouse_event |
( |
int | dwFlags, |
|
|
int | dx, |
|
|
int | dy, |
|
|
int | dwData, |
|
|
int | dwExtraInfo ) |
◆ MouseWheelDown()
| static void BioCore.Win32.MouseWheelDown |
( |
| ) |
|
|
static |
MouseWheelDown() simulates a mouse wheel down event.
Definition at line 76 of file Win32.cs.
77 {
79 }
const int MOUSEEVENTF_WHEEL
static void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo)
◆ MouseWheelUp()
| static void BioCore.Win32.MouseWheelUp |
( |
| ) |
|
|
static |
"MouseWheelUp()" is a function that simulates a mouse wheel up event.
Definition at line 71 of file Win32.cs.
◆ RunningOnWine()
| static bool BioCore.Win32.RunningOnWine |
( |
| ) |
|
|
static |
If the process "winlogon" is running, then we are on Windows. If it is not running, then we are on Wine
- Returns
- The return value is a boolean value.
Definition at line 93 of file Win32.cs.
94 {
95
96 Process[] pr = Process.GetProcessesByName("winlogon");
97 if (pr.Length != 0)
98 return true;
99 else
100 return false;
101 }
◆ SetFocus()
| static void BioCore.Win32.SetFocus |
( |
string | process | ) |
|
|
static |
It takes a string as a parameter, and then sets the focus to the process that matches the string
- Parameters
-
| process | The name of the process you want to focus on. |
Definition at line 84 of file Win32.cs.
85 {
86 Process pr = Process.GetProcessesByName(process)[0];
88 }
static bool SetForegroundWindow(IntPtr hWnd)
◆ SetForegroundWindow()
| static bool BioCore.Win32.SetForegroundWindow |
( |
IntPtr | hWnd | ) |
|
◆ MOUSEEVENTF_ABSOLUTE
| const int BioCore.Win32.MOUSEEVENTF_ABSOLUTE = 0x8000 |
|
static |
◆ MOUSEEVENTF_HWHEEL
| const int BioCore.Win32.MOUSEEVENTF_HWHEEL = 0x01000 |
|
static |
◆ MOUSEEVENTF_LEFTDOWN
| const int BioCore.Win32.MOUSEEVENTF_LEFTDOWN = 0x0002 |
|
static |
◆ MOUSEEVENTF_LEFTUP
| const int BioCore.Win32.MOUSEEVENTF_LEFTUP = 0x0004 |
|
static |
◆ MOUSEEVENTF_MIDDLEDOWN
| const int BioCore.Win32.MOUSEEVENTF_MIDDLEDOWN = 0x0020 |
|
static |
◆ MOUSEEVENTF_MIDDLEUP
| const int BioCore.Win32.MOUSEEVENTF_MIDDLEUP = 0x0040 |
|
static |
◆ MOUSEEVENTF_MOVE
| const int BioCore.Win32.MOUSEEVENTF_MOVE = 0x0001 |
|
static |
◆ MOUSEEVENTF_RIGHTDOWN
| const int BioCore.Win32.MOUSEEVENTF_RIGHTDOWN = 0x0008 |
|
static |
◆ MOUSEEVENTF_RIGHTUP
| const int BioCore.Win32.MOUSEEVENTF_RIGHTUP = 0x0010 |
|
static |
◆ MOUSEEVENTF_WHEEL
| const int BioCore.Win32.MOUSEEVENTF_WHEEL = 0x0800 |
|
static |
◆ MOUSEEVENTF_XDOWN
| const int BioCore.Win32.MOUSEEVENTF_XDOWN = 0x0080 |
|
static |
◆ MOUSEEVENTF_XUP
| const int BioCore.Win32.MOUSEEVENTF_XUP = 0x0100 |
|
static |
◆ WM_KEYDOWN
| const int BioCore.Win32.WM_KEYDOWN = 0x100 |
|
static |
◆ WM_KEYUP
| const int BioCore.Win32.WM_KEYUP = 0x101 |
|
static |
The documentation for this class was generated from the following file: