Advertisement
Guest User

Untitled

a guest
May 5th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. IntPtr hWnd_from = target[0].MainWindowHandle;
  2. for (int i = 0; i < lst.Count; i++)
  3. {
  4. string str = lst[i].ToString();
  5. }
  6.  
  7. if (GetWindowRect(hWnd_from, out rect_from))
  8. {
  9. int width_from = rect_from.Right - rect_from.Left + 1; // fromForm's width
  10. int height_from = rect_from.Bottom - rect_from.Top + 1; // fromForm's height
  11.  
  12. rCurSize.Left = rect_from.Left;
  13. rCurSize.Top = rect_from.Right;
  14. rCurSize.Right = rect_from.Right;
  15. rCurSize.Bottom = height_from;
  16.  
  17. MoveWindow(target[0].MainWindowHandle, nX, nY, width_from, height_from, true);
  18.  
  19. // m_BtReset.Enabled = true;
  20. // SetWindowPos(hWnd_from, (IntPtr)SpecialWindowHandles.HWND_TOP, nX, nY, width_from, height_from,
  21. // SetWindowPosFlags.SWP_SHOWWINDOW);
  22.  
  23. }
  24.  
  25. }
  26. catch (Exception ex)
  27. {
  28. string str = ex.Message;
  29. MessageBox.Show("ERROR",str, MessageBoxButtons.OK, MessageBoxIcon.Error);
  30. m_BtReset.Enabled = false;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement