コード例 #1
0
        protected void UpdateAttachWindowOffset()
        {
            if (_gameMemory.Process.WindowHandle == IntPtr.Zero)
            {
                return;
            }

            Utilities.Rect rect = WinEventHook.GetWindowRect(_gameMemory.Process.WindowHandle);

            Properties.Settings.Default.YOffset = (int)(rect.Top - Top);
            Properties.Settings.Default.XOffset = (int)(rect.Left - Left);
        }
コード例 #2
0
        protected void UpdateAttachWindowPosition()
        {
            if (_gameMemory.Process.WindowHandle == IntPtr.Zero)
            {
                return;
            }

            Utilities.Rect rect = WinEventHook.GetWindowRect(_gameMemory.Process.WindowHandle);

            _isAttachWindowUpdate = true;
            Top  = rect.Top - Properties.Settings.Default.YOffset;
            Left = rect.Left - Properties.Settings.Default.XOffset;
            _isAttachWindowUpdate = false;
        }