Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,21 @@
open System.Windows.Forms
open System.Runtime.InteropServices
#nowarn "9"
[<Struct; StructLayout(LayoutKind.Sequential)>]
type POINT =
new (x, y) = { X = x; Y = y }
val X : int
val Y : int
[<DllImport("user32.dll")>]
extern nativeint GetForegroundWindow();
[<DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true, ExactSpelling=true)>]
extern int ScreenToClient(nativeint hWnd, POINT &pt);
let GetMousePosition() =
let hwnd = GetForegroundWindow()
let pt = Cursor.Position
let mutable ptFs = new POINT(pt.X, pt.Y)
ScreenToClient(hwnd, &ptFs) |> ignore
ptFs