Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IntPtr hWnd_from = target[0].MainWindowHandle;
- for (int i = 0; i < lst.Count; i++)
- {
- string str = lst[i].ToString();
- }
- if (GetWindowRect(hWnd_from, out rect_from))
- {
- int width_from = rect_from.Right - rect_from.Left + 1; // fromForm's width
- int height_from = rect_from.Bottom - rect_from.Top + 1; // fromForm's height
- rCurSize.Left = rect_from.Left;
- rCurSize.Top = rect_from.Right;
- rCurSize.Right = rect_from.Right;
- rCurSize.Bottom = height_from;
- MoveWindow(target[0].MainWindowHandle, nX, nY, width_from, height_from, true);
- // m_BtReset.Enabled = true;
- // SetWindowPos(hWnd_from, (IntPtr)SpecialWindowHandles.HWND_TOP, nX, nY, width_from, height_from,
- // SetWindowPosFlags.SWP_SHOWWINDOW);
- }
- }
- catch (Exception ex)
- {
- string str = ex.Message;
- MessageBox.Show("ERROR",str, MessageBoxButtons.OK, MessageBoxIcon.Error);
- m_BtReset.Enabled = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement