Re: C# D. MoveWindow
est-ce que quelqu'un qui a D. et Visual Studio C# peut faire un test tout simple avec une Form et 1 bouton.
Quand on click :
/* Declarations */
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetCursorPos")]
internal extern static Int32 SetCursorPos(Int32 x, Int32 y);
/* Fonction */
IntPtr hWnd = FindWindow(null, "D.");
SetForegroundWindow(hWnd);
SetCursorPos(500, 500);
Pourquoi ça ne marche pas ? :/