public override void OnReposition (WinAPI.Position position) { if (position.Global) { _globalX = position.GlobalX; _globalY = position.GlobalY; } bool asdf = WinAPI.SetWindowPos(Handle, WinAPI.HWND.TOPMOST, position.X + _globalX, position.Y + _globalY, position.Width, position.Height, (WinAPI.SWP.NOZORDER | WinAPI.SWP.NOACTIVATE)); }
public static extern bool ClientToScreen (IntPtr hWnd, ref WinAPI.Point lpPoint);
//--------------------------------------------------------------------- public virtual void OnReposition (WinAPI.Position position) { }
public Position (WinAPI.RECT rect) : this( rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0, 0, false) { }
//--------------------------------------------------------------------- public override void OnReposition (WinAPI.Position position) { WinAPI.SetWindowPos(Handle, WinAPI.HWND.TOP, position.X, position.Y, position.Width, position.Height, (WinAPI.SWP.NOZORDER | WinAPI.SWP.NOACTIVATE)); }