/// <summary> /// Retrieves information about this window /// </summary> protected WinApi.WINDOWINFO GetWindowInfo() { WinApi.WINDOWINFO info = new WinApi.WINDOWINFO(); info.cbSize = (uint)Marshal.SizeOf(info); WinApi.GetWindowInfo(Handle, ref info); return(info); }
private WinApi.RECT GetClientBounds() { WinApi.WINDOWINFO info = new WinApi.WINDOWINFO(); info.cbSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(info); WinApi.GetWindowInfo(Client.Tibia.MainWindowHandle, ref info); return(info.rcClient); }
public void GetWindowHandler(int x, int y) { IntPtr hWnd = WinApi.WindowFromPoint(new WinApi.POINT(x, x));; if (hWnd != null) { //WinApi.SetActiveWindow(hWnd); //WinApi.SetForegroundWindow(hWnd); WinApi.SetWindowText(hWnd, hWnd.ToInt32().ToString()); WinApi.WINDOWINFO info = new WinApi.WINDOWINFO(); WinApi.GetWindowInfo(hWnd, ref info); Console.WriteLine(hWnd.ToInt32().ToString()); } }