add Modules.Windows
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
Imports System.Text
|
||||
|
||||
Public Class NativeMethods
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function GetDC(ByVal hwnd As IntPtr) As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function ReleaseDC(ByVal hwnd As IntPtr, ByVal hdc As IntPtr) As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function GetWindowRect(ByVal hWnd As HandleRef, ByRef lpRect As RectangleAPI) As Boolean
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function AttachThreadInput(ByVal idAttach As IntPtr, ByVal idAttachTo As IntPtr, fAttach As Boolean) As Boolean
|
||||
End Function
|
||||
@@ -9,6 +18,9 @@ Public Class NativeMethods
|
||||
Public Shared Function GetFocus() As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function WindowFromPoint(ByVal p As PointAPI) As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
Public Shared Function GetForegroundWindow() As IntPtr
|
||||
End Function
|
||||
<DllImport("user32.dll")>
|
||||
@@ -63,6 +75,9 @@ Public Class NativeMethods
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)>
|
||||
Public Shared Function RegisterWindowMessage(ByVal lpString As String) As Integer
|
||||
End Function
|
||||
<DllImport("user32.dll", ExactSpelling:=True, SetLastError:=True)>
|
||||
Public Shared Function GetCursorPos(ByRef lpPoint As PointAPI) As <MarshalAs(UnmanagedType.Bool)> Boolean
|
||||
End Function
|
||||
|
||||
Public Const STANDARD_RIGHTS_REQUIRED As Integer = &HF0000
|
||||
Public Const SECTION_QUERY As Short = &H1
|
||||
@@ -99,4 +114,29 @@ Public Class NativeMethods
|
||||
NoCache = &H200
|
||||
WriteCombine = &H400
|
||||
End Enum
|
||||
|
||||
Public Enum ChildWindowFromPointFlags As UInteger
|
||||
CWP_ALL
|
||||
CWP_SKIPINVISIBLE
|
||||
CWP_SKIPDISABLED
|
||||
CWP_SKIPTRANSPARENT
|
||||
End Enum
|
||||
|
||||
Public Structure RectangleAPI
|
||||
Public Left As Integer
|
||||
Public Top As Integer
|
||||
Public Right As Integer
|
||||
Public Bottom As Integer
|
||||
End Structure
|
||||
|
||||
<System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)>
|
||||
Public Structure PointAPI
|
||||
Public X As Integer
|
||||
Public Y As Integer
|
||||
|
||||
Public Sub New(ByVal X As Integer, ByVal Y As Integer)
|
||||
Me.X = X
|
||||
Me.Y = Y
|
||||
End Sub
|
||||
End Structure
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user