[API]
GetWindowPlacement
WINDOWPLACEMENT

[INCLUDE]
MoveRectToWorkArea

[CODE]
Public Sub MoveWindowToWorkArea(ByVal hWnd As Long)
  Dim xType1 As WINDOWPLACEMENT
  xType1.Length = 44& 'Len(xType4)
  If Not GetWindowPlacement(hWnd, xType1) = 0& Then
    Call MoveRectToWorkArea(xType1.rcNormalPosition)
    Call SetWindowPos(hWnd, 0&, xType1.rcNormalPosition.Left, xType1.rcNormalPosition.Top, xType1.rcNormalPosition.Right, xType1.rcNormalPosition.Bottom, &H214&)
    End If
  End Sub
