"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eL**************@TK2MSFTNGP15.phx.gbl...
Form Placement Component
<URL:http://www.codeproject.com/csharp/Placement.asp>
I was able to extract what I needed (below).
Thanks.
Bob
----------------
Private Declare Function GetWindowPlacement Lib "user32" _
(ByVal hwnd As IntPtr, _
ByRef lpwndpl As WINDOWPLACEMENT) As Integer
Public Structure WINDOWPLACEMENT
Public length As Integer
Public flags As Integer
Public showCmd As Integer
Public ptMinPosition As POINT
Public ptMaxPosition As POINT
Public rcNormalPosition As RECT
Public Structure RECT
Public Sub New( _
ByVal l As Integer, ByVal t As Integer, _
ByVal r As Integer, ByVal b As Integer)
Left = l
Top = t
Right = r
Bottom = b
End Sub
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
Public Structure POINT
Public Sub New(ByVal iX As Integer, ByVal iY As Integer)
X = iX
Y = iY
End Sub
Public X, Y As Integer
End Structure
End Structure
Public Shared Function GetPlacement( _
ByVal hwnd As IntPtr) As WINDOWPLACEMENT
Dim wp As WINDOWPLACEMENT
GetWindowPlacement(hwnd, wp)
Return wp
End Function